import { Navigate, Outlet, useLocation } from 'react-router-dom'; import { useAuth } from './AuthContext'; export function PrivateRoute() { const { isAuthenticated, isLoading } = useAuth(); const location = useLocation(); if (isLoading) { return (
); } if (!isAuthenticated) { return ; } return ; }