"use client"; import { useEffect } from "react"; import { useTranslations } from "next-intl"; export default function Error({ error, reset: _reset, }: { error: Error & { digest?: string }; reset: () => void; }) { useEffect(() => { // Log the error to an error reporting service /* eslint-disable no-console */ console.error(error); }, [error]); console.log("error", error.message, error.digest); const t = useTranslations("ERROR_MESSAGE"); return (
{t("Message")}: {error.message}
{t("Digest")}: {error.digest}