From 87a741540be4acc6b6fe010807e8d7f4878f3288 Mon Sep 17 00:00:00 2001 From: Tracewebstudio Dev Date: Tue, 21 Apr 2026 23:58:09 +0200 Subject: [PATCH] fix: RequireAuth no fallback UI, client-only check --- src/lib/auth.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/auth.tsx b/src/lib/auth.tsx index adde904..589c809 100644 --- a/src/lib/auth.tsx +++ b/src/lib/auth.tsx @@ -148,15 +148,14 @@ export function useAuth() { return ctx; } -export function RequireAuth(props: ParentProps<{ fallback?: string }>) { +export function RequireAuth(props: ParentProps) { const navigate = useNavigate(); const auth = useAuth(); - const fallback = props.fallback || '/login'; createEffect(() => { if (typeof window === 'undefined') return; if (!auth.isAuthenticated()) { - navigate(fallback, { replace: true }); + navigate('/login', { replace: true }); } });