import { Navigate, useLocation } from 'react-router-dom'; import { useAuth } from '@/contexts/AuthContext'; interface ProtectedRouteProps { children: React.ReactNode; } export default function ProtectedRoute({ children }: ProtectedRouteProps) { const { isAuthenticated, isLoading } = useAuth(); const location = useLocation(); if (isLoading) { return (
Loading...