You've already forked AstralRinth
forked from didirus/AstralRinth
Fix generator API URL & Button props
This commit is contained in:
@@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
export let disabled = false;
|
export let disabled = false;
|
||||||
|
|
||||||
|
/** Hover title for accessibility */
|
||||||
|
export let title = '';
|
||||||
|
|
||||||
|
/** Link target */
|
||||||
|
export let target = '';
|
||||||
|
|
||||||
let className: string;
|
let className: string;
|
||||||
$: className = classCombine([
|
$: className = classCombine([
|
||||||
'button',
|
'button',
|
||||||
@@ -40,11 +46,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if as === 'a'}
|
{#if as === 'a'}
|
||||||
<a class={className} {href} {disabled} on:click>
|
<a class={className} {href} {disabled} {title} {target} on:click>
|
||||||
<slot />
|
<slot />
|
||||||
</a>
|
</a>
|
||||||
{:else}
|
{:else}
|
||||||
<svelte:element this={as} class={className} {disabled} on:click>
|
<svelte:element this={as} class={className} {disabled} {title} on:click>
|
||||||
<slot />
|
<slot />
|
||||||
</svelte:element>
|
</svelte:element>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { gameVersions } from './outputs/gameVersions.js';
|
|||||||
import { tags } from './outputs/tags.js';
|
import { tags } from './outputs/tags.js';
|
||||||
|
|
||||||
const API_URL =
|
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://staging-api.modrinth.com/v2/'
|
||||||
: 'https://api.modrinth.com/v2/';
|
: 'https://api.modrinth.com/v2/';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user