Files
web/app/[lang]/(live-current)/@header/error.tsx
2024-12-19 10:35:20 +00:00

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
}