diff --git a/decnet_web/src/App.tsx b/decnet_web/src/App.tsx index fe2c8e95..ce1e9ad7 100644 --- a/decnet_web/src/App.tsx +++ b/decnet_web/src/App.tsx @@ -13,6 +13,15 @@ import RemoteUpdates from './components/RemoteUpdates'; import SwarmHosts from './components/SwarmHosts'; import AgentEnrollment from './components/AgentEnrollment'; import MazeNET from './components/MazeNET/MazeNET'; +import TopologyList from './components/TopologyList/TopologyList'; + +/* Guard the /mazenet route so it's always bound to a real topology. + * Bare /mazenet → /topologies; ?topology= → editor. */ +function MazeNETRoute() { + const qs = typeof window !== 'undefined' ? window.location.search : ''; + const hasId = new URLSearchParams(qs).get('topology'); + return hasId ? : ; +} function isTokenValid(token: string): boolean { try { @@ -63,7 +72,8 @@ function App() { } /> } /> - } /> + } /> + } /> } /> } /> } /> diff --git a/decnet_web/src/components/Layout.tsx b/decnet_web/src/components/Layout.tsx index f0101292..666e9594 100644 --- a/decnet_web/src/components/Layout.tsx +++ b/decnet_web/src/components/Layout.tsx @@ -43,6 +43,7 @@ const Layout: React.FC = ({ children, onLogout, onSearch }) => {