From cd1dd12c15c37bf3b3e01a8555fb7823089d6a43 Mon Sep 17 00:00:00 2001 From: elpatron Date: Fri, 5 Jun 2026 10:31:54 +0200 Subject: [PATCH] fix: require auth before rendering admin dashboard Show login instead of AdminDashboard on /admin when unauthenticated to avoid pointless admin API calls. Co-authored-by: Cursor --- client/src/App.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/App.tsx b/client/src/App.tsx index 404e378..d316d83 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -563,6 +563,14 @@ function App() { } if (isAdminRoute) { + if (!isAuthenticated) { + return ( +
+ +
+ ) + } + return (