diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 683b45a..c883797 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -26,7 +26,7 @@ export const App = () => { + } diff --git a/ui/src/components/ProtectedRoute.tsx b/ui/src/components/ProtectedRoute.tsx index 2547719..bb7320a 100644 --- a/ui/src/components/ProtectedRoute.tsx +++ b/ui/src/components/ProtectedRoute.tsx @@ -3,12 +3,13 @@ import { useSession } from "../contexts/SessionContext"; import { Navigate } from "react-router-dom"; interface ProtectedRouteProps { children: ReactNode; + to?: string; } -export const ProtectedRoute = ({ children }: ProtectedRouteProps) => { +export const ProtectedRoute = ({ children, to }: ProtectedRouteProps) => { const { session } = useSession(); if (!session) { - return ; + return ; } // If authenticated, render the protected component