Fix generator API URL & Button props

This commit is contained in:
venashial
2022-05-24 21:18:54 -07:00
parent d8d55f032e
commit d690e1b37a
2 changed files with 9 additions and 3 deletions

View File

@@ -30,6 +30,12 @@
export let disabled = false;
/** Hover title for accessibility */
export let title = '';
/** Link target */
export let target = '';
let className: string;
$: className = classCombine([
'button',
@@ -40,11 +46,11 @@
</script>
{#if as === 'a'}
<a class={className} {href} {disabled} on:click>
<a class={className} {href} {disabled} {title} {target} on:click>
<slot />
</a>
{:else}
<svelte:element this={as} class={className} {disabled} on:click>
<svelte:element this={as} class={className} {disabled} {title} on:click>
<slot />
</svelte:element>
{/if}

View File

@@ -5,7 +5,7 @@ import { gameVersions } from './outputs/gameVersions.js';
import { tags } from './outputs/tags.js';
const API_URL =
process.env.VITE_API_URL || process.env?.NODE_ENV === 'development'
process.env.VITE_API_URL && process.env.VITE_API_URL === 'https://staging-api.modrinth.com/v2/'
? 'https://staging-api.modrinth.com/v2/'
: 'https://api.modrinth.com/v2/';