chore: sync submodule state (parent ref update)
Made-with: Cursor
This commit is contained in:
36
services/token-aggregation/frontend/src/App.tsx
Normal file
36
services/token-aggregation/frontend/src/App.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
||||
import { useAuthStore } from './stores/authStore';
|
||||
import Login from './pages/Login';
|
||||
import Dashboard from './pages/Dashboard';
|
||||
import ApiKeys from './pages/ApiKeys';
|
||||
import Endpoints from './pages/Endpoints';
|
||||
import DexFactories from './pages/DexFactories';
|
||||
import Layout from './components/Layout';
|
||||
import ProtectedRoute from './components/ProtectedRoute';
|
||||
|
||||
function App() {
|
||||
const { isAuthenticated } = useAuthStore();
|
||||
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/login" element={isAuthenticated ? <Navigate to="/" replace /> : <Login />} />
|
||||
<Route
|
||||
path="/"
|
||||
element={
|
||||
<ProtectedRoute>
|
||||
<Layout />
|
||||
</ProtectedRoute>
|
||||
}
|
||||
>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="api-keys" element={<ApiKeys />} />
|
||||
<Route path="endpoints" element={<Endpoints />} />
|
||||
<Route path="dex-factories" element={<DexFactories />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user