"use client"

import { useEffect } from "react"

export default function Error({
  error,
}: {
  error: Error & { digest?: string }
}) {
  useEffect(() => {
    console.error({ breadcrumbsError: error })
  }, [error])

  return (
    <p>
      <strong>
        Error loading this page ({error.digest}@{Date.now()})
      </strong>
    </p>
  )
}
