mara, PR review: "make agentspage a subdir now that its split into sub components". AgentsPage.tsx/.css, AgentCard.tsx/.css, AgentTypes.ts, and WantedMenu.tsx move as a family into their own pages/agents/ directory; CreateAgentForm and LinkMatrixAccountForm stay in pages/ since they aren't part of this split (CreateAgentForm is still rendered inside AgentsPage's own dialog but is a standalone, independently-named form, not one of the pieces carved out of the page itself). Pure move: relative imports within the new pages/agents/ family are unchanged (they were always siblings), only the ones reaching back out to ui/ and the two forms above gained one more '../', plus App.tsx's route import.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
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 { AgentsPage } from "./pages/agents/AgentsPage.js";
|
|
import { ComponentsPage } from "./pages/ComponentsPage.js";
|
|
import { JobsPage } from "./pages/JobsPage.js";
|
|
import { HivesPage } from "./pages/HivesPage.js";
|
|
import { IssueReportPage } from "./pages/IssueReportPage.js";
|
|
import { Panel } from "./ui/panel/Panel.js";
|
|
|
|
function NotFound() {
|
|
return (
|
|
<Panel title="404" icon="🧭">
|
|
<p>no route here.</p>
|
|
</Panel>
|
|
);
|
|
}
|
|
|
|
export function App() {
|
|
return (
|
|
<Shell>
|
|
<Switch>
|
|
<Route path="/" component={HivesPage} />
|
|
<Route path="/agents" component={AgentsPage} />
|
|
<Route path="/jobs" component={JobsPage} />
|
|
<Route path="/issues" component={IssueReportPage} />
|
|
<Route path="/components" component={ComponentsPage} />
|
|
<Route component={NotFound} />
|
|
</Switch>
|
|
</Shell>
|
|
);
|
|
}
|