Skip to content

g1t/apps/web/app/routes/not-found.tsx

24 lines884 bytesCodeBlame

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.

Webhooks: every event, to your own addresses, signed and retried1import { data } from "react-router";
2
Agents and memory, checks and conflicts, profiles, slug renames, custom domains3import type { Route } from "./+types/not-found";
4import { redirectIfRenamed } from "../lib/renamed.server";
Merge branch 'worktree-agent-a8385d293d42c913a'5import { pagePath } from "../lib/workspace-nav";
Agents and memory, checks and conflicts, profiles, slug renames, custom domains6
Webhooks: every event, to your own addresses, signed and retried7/**
8 * Any address no other route matches. Throwing the 404 from a route, rather
9 * than leaving the router to, means the root loader still runs, so someone
10 * signed in sees the page in their own sidebar and not the public frame.
Agents and memory, checks and conflicts, profiles, slug renames, custom domains11 *
Merge branch 'worktree-agent-a8385d293d42c913a'12 * An address under a renamed workspace's old name, or under an alias, is
13 * sent to the workspace's name first, so deep links keep working the same
14 * as its pages do.
Webhooks: every event, to your own addresses, signed and retried15 */
Agents and memory, checks and conflicts, profiles, slug renames, custom domains16export async function loader({ request }: Route.LoaderArgs) {
Merge branch 'worktree-agent-a8385d293d42c913a'17 const first = pagePath(new URL(request.url).pathname).split("/")[1];
Agents and memory, checks and conflicts, profiles, slug renames, custom domains18 if (first) await redirectIfRenamed(request, first);
Webhooks: every event, to your own addresses, signed and retried19 throw data(null, { status: 404 });
20}
21
22export default function NotFound() {
23 return null;
24}

This file's history is long; its oldest lines are credited to the oldest commit read.