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