import { Navigate } from "react-router-dom"; import { useAuth } from "../components/context/AuthContext"; const ProtectedRoute = ({ children }: { children: React.ReactNode }) => { const { isAuthenticated } = useAuth(); if (!isAuthenticated) { return ; } return children; }; export default ProtectedRoute;