summaryrefslogtreecommitdiff
path: root/ui/lib/components/LogOut.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/components/LogOut.svelte')
-rw-r--r--ui/lib/components/LogOut.svelte10
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>