import { Links, Meta, Outlet, Scripts, ScrollRestoration, isRouteErrorResponse } from "react-router"; import type { LinksFunction } from "react-router"; import type { Route } from "./+types/root"; import * as Sentry from "@sentry/react"; import stylesheet from "@trails-cool/ui/styles.css?url"; export const links: LinksFunction = () => [{ rel: "stylesheet", href: stylesheet }]; export function Layout({ children }: { children: React.ReactNode }) { return (
{error.status === 404 && "Page not found"} {error.status === 503 && "Service temporarily unavailable"} {error.status !== 404 && error.status !== 503 && (error.statusText || "Something went wrong")}
{error instanceof Error ? error.message : "An unexpected error occurred"}