30 lines
682 B
TypeScript
30 lines
682 B
TypeScript
"use client";
|
|
|
|
export const Error = ({
|
|
statusCode,
|
|
title,
|
|
}: {
|
|
statusCode: number;
|
|
title: string;
|
|
}) => {
|
|
return (
|
|
<div className="flex items-center justify-center ">
|
|
<div className="shadow-lg rounded-2xl p-8 text-center max-w-md w-full ">
|
|
<h1 className="text-6xl font-bold text-red-500">{statusCode}</h1>
|
|
<p className="text-xl font-semibold mt-4">
|
|
Oh nein! Ein Fehler ist aufgetreten.
|
|
</p>
|
|
<p className="text-gray-600 mt-2">
|
|
{title || "Ein unerwarteter Fehler ist aufgetreten."}
|
|
</p>
|
|
<button
|
|
onClick={() => window.location.reload()}
|
|
className="btn btn-dash my-2"
|
|
>
|
|
Refresh Page
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|