summaryrefslogtreecommitdiff
path: root/hi-ui/src/lib/components/LogOut.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'hi-ui/src/lib/components/LogOut.svelte')
-rw-r--r--hi-ui/src/lib/components/LogOut.svelte22
1 files changed, 0 insertions, 22 deletions
diff --git a/hi-ui/src/lib/components/LogOut.svelte b/hi-ui/src/lib/components/LogOut.svelte
deleted file mode 100644
index 01bef1b..0000000
--- a/hi-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>