import "@fontsource-variable/inter/opsz.css"; import { RootProvider } from "fumadocs-ui/provider/react-router"; import type { ReactNode } from "react"; import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration, } from "react-router"; import Header from "@/components/header"; import DocsSearchDialog from "@/components/search"; import VersionBanner from "@/components/version-banner"; import type { Route } from "./+types/root"; import "./app.css"; export function Layout({ children }: { children: ReactNode }) { return ( {children} ); } export default function App() { return ; } // A missing page is a 404 when navigating within the site. Loaded directly, it // comes from the prerendered fallback, which has no data for the route. function isNotFound(error: unknown) { if (isRouteErrorResponse(error)) { return error.status === 404; } return error instanceof Error && error.message.startsWith("No result found for routeId"); } export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { const isMissing = isNotFound(error); return ( <>

{isMissing ? "Page not found" : "Something went wrong"}

{!isMissing && error instanceof Error && (
{error.message}
)} Back to the docs
); }