Some checks failed
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
24 lines
463 B
TypeScript
24 lines
463 B
TypeScript
'use client';
|
|
|
|
import Error from 'next/error';
|
|
import { useEffect } from 'react';
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
}) {
|
|
useEffect(() => {
|
|
console.error('Global Error:', 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>
|
|
);
|
|
}
|