Files
CapaKraken/apps/web/src/app/global-error.tsx
T

27 lines
455 B
TypeScript

"use client";
import { useEffect } from "react";
export default function GlobalError({
error,
reset,
}: {
error: Error;
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<html>
<body>
<div style={{ padding: "2rem", textAlign: "center" }}>
<h2>Something went wrong</h2>
<button onClick={reset}>Try again</button>
</div>
</body>
</html>
);
}