Fix error boundary

This commit is contained in:
2023-10-19 16:49:37 -04:00
parent dfd928457c
commit 1994a5ee5e

View File

@ -17,7 +17,6 @@ import {
Meta,
Outlet,
Scripts,
useCatch,
useLoaderData,
useRouteError,
} from "@remix-run/react";
@ -30,7 +29,7 @@ import { type ReactNode, StrictMode, useContext, useEffect } from "react";
import theme from "../theme.js";
import { withEmotionCache } from "@emotion/react";
export function CatchBoundary() {
export function ErrorBoundary() {
const error = useRouteError() as ErrorResponse;
if (!isRouteErrorResponse(error))
@ -46,7 +45,7 @@ export function CatchBoundary() {
<Text>Details: {error}</Text>
<br />
<br />
<Link color="#646cff" onClick={location.reload}>
<Link color="#646cff" onClick={() => location.reload()}>
Refresh
</Link>
</Container>