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 <cursoragent@cursor.com>
This commit is contained in:
2026-06-05 10:31:54 +02:00
parent 43cf589613
commit cd1dd12c15
+8
View File
@@ -563,6 +563,14 @@ function App() {
}
if (isAdminRoute) {
if (!isAuthenticated) {
return (
<div className="auth-screen">
<AuthOnboarding onAuthenticated={handleAuthenticated} onOpenDemo={openDemo} />
</div>
)
}
return (
<div style={{ display: 'contents' }}>
<AdminDashboard onBack={handleBackFromAdmin} />