mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
24 lines
401 B
TypeScript
24 lines
401 B
TypeScript
|
'use client';
|
||
|
|
||
|
import * as Sentry from '@sentry/nextjs';
|
||
|
import NextError from 'next/error';
|
||
|
import { useEffect } from 'react';
|
||
|
|
||
|
export default function GlobalError({
|
||
|
error,
|
||
|
}: {
|
||
|
error: Error & { digest?: string };
|
||
|
}) {
|
||
|
useEffect(() => {
|
||
|
Sentry.captureException(error);
|
||
|
}, [error]);
|
||
|
|
||
|
return (
|
||
|
<html>
|
||
|
<body>
|
||
|
<NextError statusCode={0} />
|
||
|
</body>
|
||
|
</html>
|
||
|
);
|
||
|
}
|