Skip to content

Commit

Permalink
chore(examples): avoid prefetch of non-existing routes in SvelteKit (n…
Browse files Browse the repository at this point in the history
…extauthjs#6351)

Avoid prefetch of non-existing routes

This avoids prefetch of the /auth/signin and /auth/signout virtual links as they do not exist in sveltkit routes
  • Loading branch information
benquan authored Jan 10, 2023
1 parent 3c7c25c commit 2377596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/examples/sveltekit/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
$page.data.session.user?.name}</strong
>
</span>
<a href="/auth/signout" class="button">Sign out</a>
<a href="/auth/signout" class="button" data-sveltekit-preload-data="off">Sign out</a>
{:else}
<span class="notSignedInText">You are not signed in</span>
<a href="/auth/signin" class="buttonPrimary">Sign in</a>
<a href="/auth/signin" class="buttonPrimary" data-sveltekit-preload-data="off">Sign in</a>
{/if}
</p>
</div>
Expand Down

0 comments on commit 2377596

Please sign in to comment.