Skip to content

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

19 linesCodeBlameRaw
1import { Outlet } from "react-router";
2
3import type { Route } from "./+types/page-boundary";
4import { RouteError } from "../components/route-error";
5
6/**
7 * Around the pages of a repository, a workspace and your settings
8 * (routes.ts): a page that fails shows its error where it would have been,
9 * inside its frame, so the header, tabs and sidebar its layout drew stay
10 * and the rest of g1t is a click away. Without it the error would replace
11 * the layout too, which a layout's own boundary does.
12 */
13export default function PageBoundary() {
14 return <Outlet />;
15}
16
17export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
18 return <RouteError error={error} contained />;
19}