From 969b02d0fe636507acf5ee8d99240d6bb8fae010 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 6 Nov 2024 11:22:19 -0500
Subject: Move the logout button into `/me`. Make the self link a little more
 prominent.

---
 ui/lib/components/CurrentUser.svelte | 26 --------------------------
 1 file changed, 26 deletions(-)
 delete mode 100644 ui/lib/components/CurrentUser.svelte

(limited to 'ui/lib/components/CurrentUser.svelte')

diff --git a/ui/lib/components/CurrentUser.svelte b/ui/lib/components/CurrentUser.svelte
deleted file mode 100644
index 56bf915..0000000
--- a/ui/lib/components/CurrentUser.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-<script>
-  import { goto } from '$app/navigation';
-  import { logOut } from '$lib/apiServer';
-  import { currentUser } from '$lib/store';
-
-  async function handleLogout(event) {
-    event.preventDefault();
-    const response = await logOut();
-    if (200 <= response.status && response.status < 300) {
-      currentUser.update(() => null);
-      goto('/login');
-    }
-  }
-</script>
-
-<form onsubmit={handleLogout}>
-  {#if $currentUser}
-    <a href="/me">@{$currentUser.username}</a>
-  {/if}
-  <button class="border-slate-500 border-solid border-2 font-bold p-1 rounded" type="submit"
-    >log out</button
-  >
-</form>
-
-<style>
-</style>
-- 
cgit v1.2.3

