'use client'; import * as Sentry from '@sentry/nextjs'; import Error from 'next/error'; import { useEffect } from 'react'; export default function GlobalError({ error }: { error: Error }) { useEffect(() => { // Sentry.captureException(error); console.log('GlobalError error: ', error); }, [error]); return ( {/* Your Error component here... */} ); }