From 994f4a516bed8a1499e25436f465c1b6008dd5f2 Mon Sep 17 00:00:00 2001 From: Andreas Dahm Date: Wed, 29 Apr 2026 10:47:53 +0200 Subject: [PATCH] Added dev state to ui --- src/App.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.jsx b/src/App.jsx index 50344ca..fd04487 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -20,6 +20,11 @@ function App() { const location = useLocation(); useEffect(() => { + // Dev mode: inject dummy token if none exists + if (import.meta.env.MODE === 'development' && !localStorage.getItem('tbp_jwt')) { + localStorage.setItem('tbp_jwt', 'dev-dummy-token'); + } + const token = localStorage.getItem('tbp_jwt'); setIsAuthenticated(!!token); // Converts the token string (or null) to a boolean }, [location]);