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;
|
||||
|
||||
/** 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}
|
||||
|
||||
@@ -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/';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user