import type { LinksFunction } from "@remix-run/node"; import { isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteError, } from "@remix-run/react"; import fonts from "@fontsource-variable/source-code-pro/wght.css?url"; import tailwind from "~/styles/tailwind.css?url"; import docsearch from "~/styles/docsearch.css?url"; import NotFoundPage from "~/components/NotFoundPage"; import Card from "~/components/Card"; import EmptyCard from "~/components/EmptyCard"; import { ExclamationTriangleIcon } from "@heroicons/react/24/outline"; import "decimal.js-light"; try { Object.defineProperty(BigInt.prototype, "toJSON", { get() { "use strict"; return () => String(this); }, }); } catch (e) { console.warn("Unable to define toJSON on BigInt.prototype"); } export const links: LinksFunction = () => [ { rel: "stylesheet", href: tailwind }, { rel: "stylesheet", href: docsearch }, { rel: "stylesheet", href: fonts }, { rel: "stylesheet", href: "/fonts/fonts.css" }, ]; function App() { return ( Mastodon ); } export function ErrorBoundary() { const error = useRouteError(); // @ts-ignore const errorMessage = error.data?.error?.message || error?.message; if (isRouteErrorResponse(error)) { if (error.status === 404) return ; } return ( JetKVM
{errorMessage}
) } />
); } export default App;