g1t/apps/sudo/app/routes.ts

36 lines1,748 bytesCodeBlame
1import { type RouteConfig, index, route } from "@react-router/dev/routes";
2
3import { soonItems } from "./lib/nav.ts";
4
5export default [
6 index("routes/overview.tsx"),
7 route("workspaces", "routes/workspaces.tsx"),
8 route("workspaces/deleted", "routes/deleted-workspaces.tsx"),
9 route("workspaces/:slug", "routes/workspace.tsx"),
10 route("users/:username", "routes/user.tsx"),
11 route("enterprises", "routes/enterprises.tsx"),
12 route("invites", "routes/invites.tsx"),
13 route("enterprises/new", "routes/new-enterprise.tsx"),
14 route("enterprises/:id", "routes/enterprise.tsx"),
15 route("reach-out", "routes/reach-out.tsx"),
16 route("requests", "routes/requests.tsx"),
17 route("overages", "routes/overages.tsx"),
18 route("velocity", "routes/velocity.tsx"),
19 route("costs", "routes/costs.tsx"),
20 route("costs/bill", "routes/costs-bill.tsx"),
21 route("abuse", "routes/abuse.tsx"),
22 route("invoices", "routes/invoices.tsx"),
23 route("stripe", "routes/stripe.tsx"),
24 route("audit", "routes/audit.tsx"),
25 route("timezone", "routes/timezone.tsx"),
26 route("incidents", "routes/incidents.tsx"),
27 route("incidents/new", "routes/incident-new.tsx"),
28 route("incidents/maintenance/new", "routes/maintenance-new.tsx"),
29 route("incidents/maintenance/:id", "routes/maintenance.tsx"),
30 route("incidents/:id", "routes/incident.tsx"),
31 route("incidents/:id/postmortem", "routes/incident-postmortem.tsx"),
32 // What sudo will have: one placeholder page each, from lib/nav.ts.
33 ...soonItems().map((item) => route(item.to.slice(1), "routes/soon.tsx", { id: `soon${item.to.replace(/\//g, "-")}` })),
34 // Before sudo was organised around workspaces, everything was an account.
35 route("accounts/*", "routes/legacy-accounts.tsx"),
36] satisfies RouteConfig;