diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-10 21:51:10 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-10 21:52:26 -0400 |
| commit | 215b0c5cb2ff0ef0b2c7b5549704e23d651a4df9 (patch) | |
| tree | 356484ce699539f2937b768d1a1c9b83f0c7a402 /ui/src/lib/components/LogOut.svelte | |
| parent | 4401dce2b5545ce8117818812d8e3c8919f5f7fd (diff) | |
Hoist the UI one step up further
Diffstat (limited to 'ui/src/lib/components/LogOut.svelte')
| -rw-r--r-- | ui/src/lib/components/LogOut.svelte | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/ui/src/lib/components/LogOut.svelte b/ui/src/lib/components/LogOut.svelte deleted file mode 100644 index 01bef1b..0000000 --- a/ui/src/lib/components/LogOut.svelte +++ /dev/null @@ -1,22 +0,0 @@ -<script> - import { logOut} from '$lib/apiServer'; - import { currentUser } from '$lib/store'; - - async function handleLogout(event) { - const response = await logOut(); - if (200 <= response.status && response.status < 300) { - currentUser.update(() => null); - } - } -</script> - -<form on:submit|preventDefault={handleLogout}> - @{$currentUser.username} - <button - class="border-slate-500 border-solid border-2 font-bold p-1 rounded" - type="submit" - >log out</button> -</form> - -<style> -</style> |
