'use client' import { Component, type ErrorInfo, type ReactNode } from 'react' import { useTranslations } from 'next-intl' import { createClientLogger } from '@/lib/client-logger' import { Button } from '@/components/ui/button' const log = createClientLogger('ErrorBoundary') interface Props { children: ReactNode fallback?: ReactNode } interface State { hasError: boolean error: Error | null } function ErrorFallback({ error, onRetry }: { error: Error | null; onRetry: () => void }) { const t = useTranslations('errorBoundary') const tc = useTranslations('common') return (
{error?.message || t('unexpectedError')}