import { ReactNode } from 'react' import { ErrorBoundary, FallbackProps } from 'react-error-boundary' import { useTranslation } from 'react-i18next' function ErrorFallback({ error }: FallbackProps) { const { t } = useTranslation() const errorMessage = error instanceof Error ? error.message : String(error) const errorStack = error instanceof Error ? error.stack : undefined return (

{t('shared.feedback.errors.unexpected')}

{errorMessage}
{t('shared.feedback.errors.stack')}
{errorStack}
) } interface Props { children?: ReactNode } export const BaseErrorBoundary = ({ children }: Props) => { return ( {children} ) }