1
0
Fork 0

feat: handle 500 error

fix-1
Paul Makles 2023-07-30 16:51:29 +01:00
parent 893ea3d930
commit 77bf9dfeed
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6
2 changed files with 20 additions and 0 deletions

20
app/error.tsx Normal file
View File

@ -0,0 +1,20 @@
"use client";
import { NavigateBack } from "@/components/common/NavigateBack";
import Image from "next/image";
import { useEffect } from "react";
export default function Error({ error }: { error: Error }) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<div className="flex flex-col justify-center items-center gap-4 h-[640px]">
<Image width={240} height={120} src="/500.png" alt="derpy hooves" />
<h2 className="text-3xl">shit broke</h2>
<h3>{String(error)}</h3>
<NavigateBack />
</div>
);
}

BIN
public/500.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB