hyperhive/frontend/packages/swarm-ui/src/App.tsx
iris 47e89c1c93 swarm-ui: move create-agent page off /agents, rename to CreateAgentPage
mara: the route should reflect creating an agent, and stay separate
from a future agent list page. Renamed AgentsPage -> CreateAgentPage
(file, component, css classes) and moved the route from /agents to
/create-agent - flat, not /agents/new, since index.html's relative
asset links only resolve correctly one path segment deep (filed
separately as a real bug, not fixed here). Leaves the bare /agents
path free for a future roster page.
2026-08-17 00:20:10 +02:00

31 lines
984 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 { 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="/create-agent" component={CreateAgentPage} />
<Route path="/jobs" component={JobsPage} />
<Route path="/components" component={ComponentsPage} />
<Route component={NotFound} />
</Switch>
</Shell>
);
}