All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 27s
Build & Deploy / 🚀 Deploy (push) Successful in 34s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 3m38s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m19s
Build & Deploy / 🔔 Notify (push) Successful in 5s
26 lines
514 B
TypeScript
26 lines
514 B
TypeScript
'use client';
|
|
|
|
import Error from 'next/error';
|
|
import { useEffect } from 'react';
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
}) {
|
|
useEffect(() => {
|
|
import('@sentry/nextjs').then((Sentry) => {
|
|
Sentry.captureException(error);
|
|
});
|
|
}, [error]);
|
|
|
|
return (
|
|
<html>
|
|
<body>
|
|
{/* This is the default Next.js error component but it doesn't allow omitting the statusCode */}
|
|
<Error statusCode={0} />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|