summaryrefslogtreecommitdiff
path: root/hi-ui/src/lib/LogOut.svelte
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-09-27 23:08:56 -0400
committerKit La Touche <kit@transneptune.net>2024-09-27 23:08:56 -0400
commitb892bd9fdba5fe9397f3c4432b3039aa961b7a14 (patch)
tree05fcba01d80fe663318d06f5d5a6b00bc9fee792 /hi-ui/src/lib/LogOut.svelte
parent1d8b828d1bbe0e0daa64f6fc2689799c7169afa0 (diff)
Add lots of style and layout
Diffstat (limited to 'hi-ui/src/lib/LogOut.svelte')
-rw-r--r--hi-ui/src/lib/LogOut.svelte12
1 files changed, 11 insertions, 1 deletions
diff --git a/hi-ui/src/lib/LogOut.svelte b/hi-ui/src/lib/LogOut.svelte
index 439a530..64d26c9 100644
--- a/hi-ui/src/lib/LogOut.svelte
+++ b/hi-ui/src/lib/LogOut.svelte
@@ -2,6 +2,12 @@
import { logOut} from '../apiServer';
import { currentUser } from '../store';
+ let user;
+
+ currentUser.subscribe((value) => {
+ user = value;
+ });
+
async function handleLogout(event) {
event.preventDefault();
const response = await logOut();
@@ -12,7 +18,11 @@
</script>
<form on:submit={handleLogout}>
- <button type="submit">log out</button>
+ @{user.username}
+ <button
+ class="border-slate-500 border-solid border-2 font-bold p-1 rounded"
+ type="submit"
+ >log out</button>
</form>
<style>