import Button from '@/components/ui/Button.tsx'; import IconWrapper from '@/components/ui/IconWrapper.tsx'; import { useTranslation } from '@/hooks/useI18n'; import { XCircle } from 'lucide-react'; import { Component, ErrorInfo, ReactNode, useState } from 'react'; interface Props { children?: ReactNode; } interface ErrorState { hasError: boolean; error?: Error; } const ErrorFallback = ({ error, onRefresh }: { error?: Error; onRefresh: () => void }) => { const { t } = useTranslation(); return (
{t('error.tryRefreshing')}
{error?.message || t('error.unknownError')}