feat: error handling for breadcrumbs

This commit is contained in:
Michael Zetterberg
2024-05-31 09:07:16 +02:00
parent d64a253300
commit 3ea53c907e

View File

@@ -0,0 +1,19 @@
"use client"
import { useEffect } from "react"
export default function Error({
error,
}: {
error: Error & { digest?: string }
}) {
useEffect(() => {
console.error({ breadcrumbsError: error })
}, [error])
return (
<p>
<strong>Breadcrumbs failed for this page ({error.digest})</strong>
</p>
)
}