20 lines
420 B
TypeScript
20 lines
420 B
TypeScript
|
"use client";
|
||
|
|
||
|
import * as Sentry from "@sentry/nextjs";
|
||
|
import Error from "next/error";
|
||
|
import { useEffect } from "react";
|
||
|
|
||
|
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
||
|
useEffect(() => {
|
||
|
Sentry.captureException(error);
|
||
|
}, [error]);
|
||
|
|
||
|
return (
|
||
|
<html>
|
||
|
<body>
|
||
|
<h1>Something shit the fan</h1>
|
||
|
</body>
|
||
|
</html>
|
||
|
);
|
||
|
}
|