Files
stats/apps/dashboard/src/app/global-error.tsx
Carl-Gerhard Lindesvärd 444e553b74 🧹 clean up duty 🧹
2024-03-28 10:40:49 +01:00

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>
);
}