import { Routes, Route, Navigate } from 'react-router-dom'; import { AuthProvider, useAuth } from './context/AuthContext'; import AuthOverlay from './components/AuthOverlay'; import Layout from './components/Layout'; import Dashboard from './pages/Dashboard'; import Tokens from './pages/Tokens'; import Keys from './pages/Keys'; import Test from './pages/Test'; import Docs from './pages/Docs'; import Logs from './pages/Logs'; import Monitor from './pages/Monitor'; import Settings from './pages/Settings'; function ProtectedRoute({ children }) { const { isAuthenticated, isLoading } = useAuth(); if (isLoading) { return (
); } if (!isAuthenticated) { return ; } return children; } function App() { return ( }> } /> } /> } /> } /> } /> } /> } /> } /> ); } export default App;