pcbjam/web/standalone/src/App.tsx
Gergő Törcsvári 234e5fe189
feat(scopes): phase 0003 — standalone scope routing, tool inference, scoped API client, Demo/Local/Cloud badges
Routes → /:scope/projects/:name/* (+ -/:tool) and /:scope/libs/:name; tool inferred from file ext / lib kind (?tool= override); currentScope()/userSlug() in config; SCOPE/USER headers + scoped paths through project + libs sources; @local/demo scopes on constructed projects; badge relabel (drop scary read-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 09:54:49 +02:00

24 lines
1,015 B
TypeScript

import { Route, Routes } from "react-router-dom";
import { VersionBadge } from "@/components/VersionBadge";
import { HomePage } from "@/pages/HomePage";
import { LibToolPage } from "@/pages/LibToolPage";
import { ProjectView } from "@/pages/ProjectView";
import { ToolPage } from "@/pages/ToolPage";
export default function App() {
return (
<>
<Routes>
<Route path="/" element={<HomePage />} />
{/* scope/kind/name grammar (see @pcbjam/shared routes.ts). The tool is
inferred from the file (or lib kind); `-/:tool` boots a fileless tool. */}
<Route path="/:scope/projects/:name" element={<ProjectView />} />
<Route path="/:scope/projects/:name/-/:tool" element={<ToolPage />} />
<Route path="/:scope/projects/:name/*" element={<ToolPage />} />
<Route path="/:scope/libs/:name" element={<LibToolPage />} />
</Routes>
{/* Version + source link, bottom-right on every route (home + editor). */}
<VersionBadge />
</>
);
}