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