Merged in feat/sentry (pull request #1089)
This commit is contained in:
committed by
Joakim Jäderberg
parent
e0c5b59860
commit
3982b1ba56
@@ -1,5 +1,19 @@
|
||||
"use client"
|
||||
|
||||
export default function Error() {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user