flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

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

22 lines793 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";
5
Webhooks: every event, to your own addresses, signed and retried6/**
7 * Any address no other route matches. Throwing the 404 from a route, rather
8 * than leaving the router to, means the root loader still runs, so someone
9 * signed in sees the page in their own sidebar and not the public frame.
Agents and memory, checks and conflicts, profiles, slug renames, custom domains10 *
11 * An address under a renamed workspace's old name is sent to the new one
12 * first, so deep links keep working the same as its pages do.
Webhooks: every event, to your own addresses, signed and retried13 */
Agents and memory, checks and conflicts, profiles, slug renames, custom domains14export async function loader({ request }: Route.LoaderArgs) {
15 const first = new URL(request.url).pathname.split("/")[1];
16 if (first) await redirectIfRenamed(request, first);
Webhooks: every event, to your own addresses, signed and retried17 throw data(null, { status: 404 });
18}
19
20export default function NotFound() {
21 return null;
22}