From 9cae9c1d2a0b4f7fa72f3075541b9ffafe1a7275 Mon Sep 17 00:00:00 2001
From: Zach Berwaldt <zberwaldt@tutamail.com>
Date: Fri, 15 Mar 2024 18:49:43 -0400
Subject: Add routes for preference, clean up and add types

---
 fe/src/lib/Layout.svelte | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'fe/src/lib/Layout.svelte')

diff --git a/fe/src/lib/Layout.svelte b/fe/src/lib/Layout.svelte
index f208f34..2728dd3 100644
--- a/fe/src/lib/Layout.svelte
+++ b/fe/src/lib/Layout.svelte
@@ -1,9 +1,13 @@
 <script>
-    import { authenticated, token } from "../stores/auth";
+    import { authenticated, token, user, preferences } from "../stores/auth";
     import PreferencesForm from "./PreferencesForm.svelte";
     import { addFormOpen } from "../stores/forms";
 
-    const logout = () => token.unauthenticate();
+    const logout = () => { 
+        preferences.reset();
+        user.reset();
+        token.unauthenticate();
+    }
     let preferenceFormOpen = false;
 
     function showPreferencesDialog() {
-- 
cgit v1.1

