diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-02-24 11:41:24 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-02-24 11:41:24 -0500 |
| commit | 099471c574f6dceeb45f8bb5dae1699a734cb084 (patch) | |
| tree | 945f44c9a90bf51de20c61a5a8c5ed82c2c05009 /ui/lib/components/LogOut.svelte | |
| parent | 36cadfe00cacc6a6523f9862d3f7a08a9d0ce611 (diff) | |
| parent | fc0f1654a56d2247728a766f43e72ff169704888 (diff) | |
Merge branch 'prop/global-state-at-top-level'
Diffstat (limited to 'ui/lib/components/LogOut.svelte')
| -rw-r--r-- | ui/lib/components/LogOut.svelte | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/lib/components/LogOut.svelte b/ui/lib/components/LogOut.svelte index 1cb8fb5..bb24681 100644 --- a/ui/lib/components/LogOut.svelte +++ b/ui/lib/components/LogOut.svelte @@ -1,15 +1,9 @@ <script> - import { goto } from '$app/navigation'; - import { logOut } from '$lib/apiServer.js'; - import { currentUser } from '$lib/store'; + let { logOut = async () => {} } = $props(); async function onsubmit(event) { event.preventDefault(); - const response = await logOut(); - if (200 <= response.status && response.status < 300) { - currentUser.set(null); - await goto('/login'); - } + await logOut(); } </script> |
