Closes #3460. Renamed for accuracy — the page/nav item is the hive roster, not a general dashboard overview. Nav label, page title, component name, and file all renamed together so the internal name doesn't drift from what's displayed (a component still called OverviewPage under a 'hives' nav label would be exactly the kind of stale prior-art that makes the next contributor search harder, not less).
31 lines
975 B
TypeScript
31 lines
975 B
TypeScript
// Root shell component — routing only. Each route's content is its own
|
|
// page component under `./pages/`; this file just maps paths to them.
|
|
import { Route, Switch } from 'wouter-preact';
|
|
import { Shell } from './shell/Shell.js';
|
|
import { ComponentsPage } from './pages/ComponentsPage.js';
|
|
import { CreateAgentPage } from './pages/CreateAgentPage.js';
|
|
import { JobsPage } from './pages/JobsPage.js';
|
|
import { HivesPage } from './pages/HivesPage.js';
|
|
import { Panel } from './ui/panel/Panel.js';
|
|
|
|
function NotFound() {
|
|
return (
|
|
<Panel title="404">
|
|
<p>no route here.</p>
|
|
</Panel>
|
|
);
|
|
}
|
|
|
|
export function App() {
|
|
return (
|
|
<Shell>
|
|
<Switch>
|
|
<Route path="/" component={HivesPage} />
|
|
<Route path="/create-agent" component={CreateAgentPage} />
|
|
<Route path="/jobs" component={JobsPage} />
|
|
<Route path="/components" component={ComponentsPage} />
|
|
<Route component={NotFound} />
|
|
</Switch>
|
|
</Shell>
|
|
);
|
|
}
|