From 8fe8edb341fbd126004b603e087df2ce202c3bef Mon Sep 17 00:00:00 2001 From: CC Worker Date: Mon, 1 Jun 2026 02:45:20 +0000 Subject: [PATCH] =?UTF-8?q?fix(auth):=20RequireAuth=20must=20use=20Outlet?= =?UTF-8?q?=20not=20children=20=E2=80=94=20React=20Router=20v6=20requires?= =?UTF-8?q?=20Route=20guards=20to=20be=20Route=20elements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppRoutes.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx index 10746fa..f39f85d 100644 --- a/src/AppRoutes.tsx +++ b/src/AppRoutes.tsx @@ -66,7 +66,7 @@ const FullContextRoutes: React.FC = () => { return ; }; -const RequireAuth: React.FC<{ children: React.ReactNode }> = ({ children }) => { +const RequireAuth: React.FC = () => { const { user, isAuthResolving } = useAuth(); if (isAuthResolving) { @@ -88,7 +88,7 @@ const RequireAuth: React.FC<{ children: React.ReactNode }> = ({ children }) => { return ; } - return <>{children}; + return ; }; const AppRoutes: React.FC = () => { @@ -159,7 +159,7 @@ const AppRoutes: React.FC = () => { /> {/* Authentication only routes - only render if all contexts are initialized */} - + }> }> {/* Timetable Module Routes */} } /> @@ -190,7 +190,7 @@ const AppRoutes: React.FC = () => { } /> } /> - + {/* Fallback route - authenticated users go to dashboard, unauthenticated see public 404 */} : } />