Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix error boundary
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent dfd9284 commit 1994a5e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/root.tsx
Expand Up @@ -17,7 +17,6 @@ import {
Meta,
Outlet,
Scripts,
useCatch,
useLoaderData,
useRouteError,
} from "@remix-run/react";
Expand All @@ -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))
Expand All @@ -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>
Expand Down

0 comments on commit 1994a5e

Please sign in to comment.