24 lines
397 B
TypeScript
24 lines
397 B
TypeScript
'use client';
|
|
|
|
import { useEffect } from 'react';
|
|
import * as Sentry from '@sentry/nextjs';
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
useEffect(() => {
|
|
Sentry.captureException(error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html lang="en">
|
|
<body>
|
|
<h1>Something went wrong</h1>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|