'use client' // Error components must be Client Components import { useEffect, useState } from 'react' export default function Error({ error, }: { error: Error & { digest?: string } reset: () => void }) { const [showFull, setShowFull] = useState(false) useEffect(() => { // Log the error to an error reporting service console.error(error) }, [error]) return ( <>
Something went wrong. Try to{' '}
{' '}
or
feel free to{' '}
contact us
{' '}
if the problem presists.
{showFull ? error.stack : error.stack?.slice(0, 200)}