redirect to admin login instead of home when not authenticated

This commit is contained in:
2026-03-21 21:47:51 +02:00
parent f09aa64f36
commit 76ec4a2955

View File

@@ -373,7 +373,7 @@ function RequireAdmin({ children }: { children: React.ReactNode }) {
useEffect(() => {
if (!admin.loading && !admin.isAdmin) {
nav('/', { replace: true })
nav('/admin/login', { replace: true })
}
}, [admin.loading, admin.isAdmin, nav])