import { useTranslation } from '@/contexts/language'; /** * Translated error-boundary UI. A FUNCTION component so it can use `t()` — the * class ErrorBoundary renders it, which keeps the class (React error boundaries * must be classes) while making the copy language-aware. */ export function ErrorFallback({ variant, onReset, onReload, onBack, }: { variant: 'app' | 'route'; onReset?: () => void; onReload: () => void; onBack?: () => void; }) { const { t } = useTranslation(); const isApp = variant === 'app'; return (
{isApp ? t('errorsUi.slammedBody') : t('errorsUi.pageSlammedBody')}