Fix error boundary
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user