import { Navigate, useLocation } from 'react-router-dom' import { useAuth } from '@/auth/AuthContext' import type { ReactNode } from 'react' export function ProtectedRoute({ children }: { children: ReactNode }) { const { token } = useAuth() const location = useLocation() if (!token) { return ( ) } return <>{children} }