unknown-project.tsx
This file
Path
apps/web/src/features/project/unknown-project.tsx
42 lines · 1.3 KiB · TypeScript
Last changed by
Merge build/comments-web-features into mainoscabrielbefore adoption74bfc72
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–5why, one step back1import { ProjectName } from "@repo/protocol/ids";2import { UnknownProject } from "@repo/protocol/refusal";3import { Option, Schema } from "effect";45import { EmptyState } from "../shared/empty.tsx";Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
line 6why, one step back6import { AppLink } from "../shared/link.tsx";Merge build/1300-w13-foundation into mainoscabrielbefore adoption0e29c37
line 7why, one step back7import { ASKS_PATH } from "../shared/paths.ts";Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
line 8why, one step back8import { RefusalView } from "../shared/refusal.tsx";Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
line 9why, one step back9import { Workspace } from "../shared/shell/workspace.tsx";Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 10–12why, one step back1011const decodeProject = Schema.decodeUnknownOption(ProjectName);12Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
lines 13–16why, one step back13const LINK = "decoration-rule underline hover:decoration-current";1415const Onward = () => (16 <div className="text-ui flex flex-wrap gap-x-4 gap-y-1">Merge build/1300-w13-foundation into mainoscabrielbefore adoption0e29c37
line 17why, one step back17 <AppLink className={LINK} to={ASKS_PATH}>Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
lines 18–22why, one step back18 Open asks19 </AppLink>20 </div>21);22Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 23–25why, one step back23export const UnknownProjectView = ({ name }: { readonly name: string }) =>24 Option.match(decodeProject(name), {25 onNone: () => (Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
lines 26–34why, one step back26 <Workspace27 crumbs={[{ label: "No such project" }]}28 title="No such project"29 >30 <EmptyState31 onward={<Onward />}32 title="A project's name is lowercase words joined by single dashes, and this address names none."33 />34 </Workspace>Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 35–36why, one step back35 ),36 onSome: (project) => (Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
line 37why, one step back37 <Workspace crumbs={[{ label: project }]} title="No such project">Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
line 38why, one step back38 <RefusalView refusals={[new UnknownProject({ project })]} />Merge build/1221-front-and-project-homeoscabrielbefore adoption493b2dd
lines 39–40why, one step back39 <Onward />40 </Workspace>Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 41–42why, one step back41 ),42 });