Skip to content

Commit

Permalink
Clear localStorage when user signs out (#150)
Browse files Browse the repository at this point in the history
* Clear localStorage when user signs out

* `localStorage` is not available in node of course
  • Loading branch information
franknoirot authored Oct 11, 2024
1 parent baa66b5 commit 1687575
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 1687575

Please sign in to comment.