restructure frontend and add network settings
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m41s

This commit is contained in:
2025-12-18 20:38:27 +01:00
parent b0de61fd9d
commit 9afe49857a
15 changed files with 1479 additions and 696 deletions

View File

@@ -0,0 +1,35 @@
// src/AppRouter.tsx
import { Navigate, Route, Routes } from 'react-router-dom';
import App from './App'; // your layout component (has <Outlet />)
import Bridges from './pages/Bridges';
import Home from './pages/Home';
import { PATHS } from './routes';
export default function AppRouter() {
return (
<Routes>
{/* App is the top-level layout; Outlet renders the active child route */}
<Route path={PATHS.ROOT} element={<App />}>
{/* When the user hits '/', redirect to '/home' */}
<Route index element={<Navigate to={PATHS.HOME} replace />} />
{/* Child routes - these render inside App's <Outlet /> */}
<Route path={PATHS.HOME.slice(1)} element={<Home />} />
<Route path={PATHS.NETWORK.slice(1)} element={<Bridges />} />
{/* Fallback (renders inside layout too) */}
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
);
}
/** simple 404 rendered inside the layout */
function NotFound() {
return (
<div style={{ padding: 16 }}>
<h2>404 – Not Found</h2>
<p>The requested page does not exist.</p>
</div>
);
}