import React from 'react' import { Navigate, Outlet } from 'react-router-dom' import { useAuth } from '../contexts/AuthContext' const ProtectedRoute = ({ children }) => { const { isAuthenticated, loading } = useAuth() if (loading) { return
Загрузка...
} if (!isAuthenticated) { return } return children || } export default ProtectedRoute