20 lines
313 B
TypeScript
20 lines
313 B
TypeScript
"use client"
|
|
|
|
import * as Sentry from "@sentry/nextjs"
|
|
import { useEffect } from "react"
|
|
|
|
export default function Error({
|
|
error,
|
|
}: {
|
|
error: Error & { digest?: string }
|
|
}) {
|
|
useEffect(() => {
|
|
if (!error) return
|
|
|
|
console.error(error)
|
|
Sentry.captureException(error)
|
|
}, [error])
|
|
|
|
return null
|
|
}
|