added error boundaries
This commit is contained in:
parent
eeb0991d35
commit
704abe7392
|
@ -236,3 +236,16 @@ export default function Index() {
|
|||
</Overlay>
|
||||
);
|
||||
}
|
||||
|
||||
export function ErrorBoundary({ error }) {
|
||||
console.log(error);
|
||||
|
||||
return (
|
||||
<Overlay>
|
||||
<div className="w-full rounded bg-ctp-red p-4 text-white">
|
||||
<h1 className="text-2xl">{error.message}</h1>
|
||||
<code>{error.stack}</code>
|
||||
</div>
|
||||
</Overlay>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import { redirect } from "@remix-run/node";
|
||||
|
||||
export function loader() {
|
||||
return redirect("/");
|
||||
}
|
|
@ -311,3 +311,16 @@ export default function Thread() {
|
|||
</Overlay>
|
||||
);
|
||||
}
|
||||
|
||||
export function ErrorBoundary({ error }) {
|
||||
console.log(error);
|
||||
|
||||
return (
|
||||
<Overlay>
|
||||
<div className="w-full rounded bg-ctp-red p-4 text-white">
|
||||
<h1 className="text-2xl">{error.message}</h1>
|
||||
<code>{error.stack}</code>
|
||||
</div>
|
||||
</Overlay>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue