g1t/apps/web/app/lib/not-found.server.ts
| 1 | import { data } from "react-router"; |
| 2 | |
| 3 | import type { MissingKind } from "./not-found"; |
| 4 | |
| 5 | /** |
| 6 | * The 404 a loader throws when the viewer cannot see what the address |
| 7 | * names. It carries only the kind of thing, never whether it exists, and is |
| 8 | * thrown the same way for something private and something missing. |
| 9 | */ |
| 10 | export function notFound(kind: MissingKind) { |
| 11 | return data({ kind }, { status: 404 }); |
| 12 | } |