Skip to content

Commit

Permalink
localStorage is not available in node of course
Browse files Browse the repository at this point in the history
  • Loading branch information
franknoirot committed Oct 11, 2024
1 parent 241fc3d commit df946f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/components/AccountMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@
<span class="flex-1 text-left">Report UI Issue</span>
<ArrowRight class="w-5 h-5 inline-block origin-center -rotate-45 ml-1" />
</a>
<a data-sveltekit-reload href={paths.SIGN_OUT} class="menu-button" on:keydown={dismiss}>
<a
data-sveltekit-reload
href={paths.SIGN_OUT}
class="menu-button"
on:keydown={dismiss}
on:click={() => localStorage.clear()}
>
<span class="flex-1 text-left">Sign Out</span>
<ArrowLeft class="w-5 h-5 inline-block origin-center -rotate-45 ml-1" />
</a>
Expand Down
1 change: 0 additions & 1 deletion src/routes/(sidebarLayout)/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export const load = async ({ cookies, request, url, fetch }) => {
*/
function signOut() {
cookies.delete(AUTH_COOKIE_NAME, { domain: DOMAIN, path: '/' })
localStorage.clear()
throw redirect(303, '/')
}
}

0 comments on commit df946f3

Please sign in to comment.