update error page
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Lee 2024-04-22 02:41:42 +01:00
parent 525b4981fe
commit ffa2db120f

@ -3,6 +3,8 @@
import * as Sentry from "@sentry/nextjs";
import Error from "next/error";
import { useEffect } from "react";
import Link from "next/link";
import { Button } from "@/app/components/ui/button";
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
useEffect(() => {
@ -10,10 +12,12 @@ export default function GlobalError({ error, reset }: { error: Error & { digest?
}, [error]);
return (
<html>
<body>
<h1>Something shit the fan</h1>
</body>
</html>
<div className="flex text-center flex-col gap-4">
<div>
<h2 className="text-red-400 font-2xl font-semibold">Error</h2>
<p>An error occurred while rendering this page.</p>
</div>
<Button onClick={reset}>Reload</Button>
</div>
);
}