Face-Recognition/app/error.tsx
2024-04-16 19:21:44 +07:00

20 lines
402 B
TypeScript

'use client' // Error components must be Client Components
import { useEffect } from 'react'
export default function Error({
error,
}: {
error: Error & { digest?: string }
}) {
useEffect(() => {
// Log the error to an error reporting service
console.error(error)
}, [error])
return (
<div>
<h2>Something went wrong!</h2>
</div>
)
}