Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| A flat project menu with Code first, views as tabs, and Stripe for every owner | 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"; | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 6 | import { projects } from "../../lib/services.server"; |
| 7 | import { getViewer } from "../../lib/session.server"; | |
| A flat project menu with Code first, views as tabs, and Stripe for every owner | 8 | import { SoonView } from "../repo/soon"; |
| 9 | ||
| 10 | export function meta({ params, ...args }: Route.MetaArgs) { | |
| 11 | const item = roadmapItem(params.feature); | |
| 12 | return page(args, { | |
| 13 | title: `${item?.title ?? "Soon"} · ${params.owner} · g1t`, | |
| 14 | description: item ? `Soon on g1t: ${item.summary}` : null, | |
| 15 | version: item ? [item.title, item.summary] : undefined, | |
| 16 | }); | |
| 17 | } | |
| 18 | ||
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 19 | export async function loader({ params, context }: Route.LoaderArgs) { |
| A flat project menu with Code first, views as tabs, and Stripe for every owner | 20 | const item = roadmapItem(params.feature); |
| 21 | // Only what spans projects lives under the workspace. | |
| 22 | if (!item || item.section !== "Workspace") throw data(null, { status: 404 }); | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 23 | // What to use until then lives in each project, so list the projects. |
| 24 | const listed = item.today ? await projects.list(params.owner, getViewer(context)).catch(() => null) : null; | |
| 25 | const inProjects = listed?.ok | |
| 26 | ? listed.value.map((project) => ({ name: project.name || project.slug, to: `/${project.workspace}/${project.slug}` })) | |
| 27 | : []; | |
| 28 | return { item, inProjects }; | |
| A flat project menu with Code first, views as tabs, and Stripe for every owner | 29 | } |
| 30 | ||
| 31 | /** What a workspace will have across its projects: boards, the roadmap, packages, the fleet. */ | |
| 32 | export default function WorkspaceSoon({ loaderData, params }: Route.ComponentProps) { | |
| 33 | return ( | |
| 34 | <div className="mx-auto max-w-5xl px-4 py-10 sm:px-8"> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 35 | <SoonView |
| 36 | item={loaderData.item} | |
| 37 | base={`/${params.owner}/-`} | |
| 38 | inProjects={loaderData.inProjects} | |
| 39 | newProject={`/new?workspace=${params.owner}`} | |
| 40 | /> | |
| A flat project menu with Code first, views as tabs, and Stripe for every owner | 41 | </div> |
| 42 | ); | |
| 43 | } |