Per mara's review on PR#3342 — the hive-status view shouldn't live inline in App.tsx. Moves it to pages/OverviewPage.tsx, mirroring JobsPage's shape: App.tsx stays routing-only, each page owns its own fetch + render.
29 lines
855 B
TypeScript
29 lines
855 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 { JobsPage } from './pages/JobsPage.js';
|
|
import { OverviewPage } from './pages/OverviewPage.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={OverviewPage} />
|
|
<Route path="/jobs" component={JobsPage} />
|
|
<Route path="/components" component={ComponentsPage} />
|
|
<Route component={NotFound} />
|
|
</Switch>
|
|
</Shell>
|
|
);
|
|
}
|