import { Navigate, Outlet } from "react-router-dom" import { useAuth } from "../auth/AuthContext" export default function ProtectedRoute() { const { isAuthenticated, loading } = useAuth() if (loading) { return (
Loading…
) } return isAuthenticated ? : }