import { Navigate } from "react-router-dom"; import { useAuth } from "@/hooks/useAuth"; export const ProtectedRoute = ({ children }: { children: React.ReactNode; }) => { const { profile } = useAuth(); if (!profile && window.location.pathname !== "/dashboard/login") { return <>{children}; } return children; }; export default ProtectedRoute;