Add sveltekit:prefetch on internal links
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
{text}
|
{text}
|
||||||
</button>
|
</button>
|
||||||
{:else if tag === 'a'}
|
{:else if tag === 'a'}
|
||||||
<a href={url} class={classes} on:click>
|
<a href={url} class={classes} on:click sveltekit:prefetch>
|
||||||
<slot />
|
<slot />
|
||||||
<span>{text}</span>
|
<span>{text}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{#each links as { icon, alt, url, text }}
|
{#each links as { icon, alt, url, text }}
|
||||||
<li>
|
<li>
|
||||||
<a href={url} on:click={toggleSwitcher} sveltekit:prefetch sveltekit:noscroll>
|
<a href={url} on:click={toggleSwitcher} sveltekit:prefetch>
|
||||||
<img src="/images/icons/{icon}.svg" alt={alt} class="icon" width="32" height="32" loading="lazy">
|
<img src="/images/icons/{icon}.svg" alt={alt} class="icon" width="32" height="32" loading="lazy">
|
||||||
<span>{text}</span>
|
<span>{text}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user