g1t/apps/web/app/routes/workspace/soon.tsx
| 1 | import { data } from "react-router"; |
| 2 | |
| 3 | import type { Route } from "./+types/soon"; |
| 4 | import { page } from "../../lib/meta"; |
| 5 | import { roadmapItem } from "../../lib/roadmap"; |
| 6 | import { SoonView } from "../repo/soon"; |
| 7 | |
| 8 | export function meta({ params, ...args }: Route.MetaArgs) { |
| 9 | const item = roadmapItem(params.feature); |
| 10 | return page(args, { |
| 11 | title: `${item?.title ?? "Soon"} · ${params.owner} · g1t`, |
| 12 | description: item ? `Soon on g1t: ${item.summary}` : null, |
| 13 | version: item ? [item.title, item.summary] : undefined, |
| 14 | }); |
| 15 | } |
| 16 | |
| 17 | export function loader({ params }: Route.LoaderArgs) { |
| 18 | const item = roadmapItem(params.feature); |
| 19 | // Only what spans projects lives under the workspace. |
| 20 | if (!item || item.section !== "Workspace") throw data(null, { status: 404 }); |
| 21 | return { item }; |
| 22 | } |
| 23 | |
| 24 | /** What a workspace will have across its projects: boards, the roadmap, packages, the fleet. */ |
| 25 | export default function WorkspaceSoon({ loaderData, params }: Route.ComponentProps) { |
| 26 | return ( |
| 27 | <div className="mx-auto max-w-5xl px-4 py-10 sm:px-8"> |
| 28 | <SoonView item={loaderData.item} base={`/${params.owner}/-`} /> |
| 29 | </div> |
| 30 | ); |
| 31 | } |