From 80d28ea2dac4adc696b481f5f52e1f3947d7b959 Mon Sep 17 00:00:00 2001
From: Ellie Huxtable <ellie@elliehuxtable.com>
Date: Wed, 19 Jun 2024 15:46:53 +0100
Subject: feat(gui): cache zustand store in localstorage (#2168)

* fix(gui): use the store to cache week start

* feat(gui): cache zustand store in localStorage

This means that before we've loaded any data, we can still display
something up-to-date. Avoid flashing!

I'll probably want to switch this to the tauri sqlite plugin later
---
 ui/src/App.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/src/App.tsx')

diff --git a/ui/src/App.tsx b/ui/src/App.tsx
index 9b5242a7..c643720a 100644
--- a/ui/src/App.tsx
+++ b/ui/src/App.tsx
@@ -105,7 +105,7 @@ function App() {
                 </ul>
               </li>
               <li className="mt-auto">
-                {user && !user.isLoggedIn() && (
+                {user && user.username === "" && !user.username && (
                   <Dialog>
                     <DialogTrigger className="w-full">
                       <Button
-- 
cgit v1.3.1

