import { Navigate, Outlet, useLocation } from 'react-router-dom'; import { useAuth } from '@/shared/context/AuthContext'; export const ProtectedRoute = () => { const { isAuthenticated, isLoading } = useAuth(); const location = useLocation(); if (isLoading) { return
Loading...
; } if (!isAuthenticated) { return ; } return ; };