import { useErrorBoundary } from 'react-error-boundary'; import { useTranslation } from 'react-i18next'; import { Text, TouchableOpacity, View } from 'react-native'; import { useTheme } from '@/theme'; import { IconByVariant } from '@/components/atoms'; type Properties = { readonly onReset?: () => void; }; function DefaultErrorScreen({ onReset = undefined }: Properties) { const { colors, fonts, gutters, layout } = useTheme(); const { t } = useTranslation(); const { resetBoundary } = useErrorBoundary(); return ( {t('error_boundary.title')} {t('error_boundary.description')} {onReset ? ( { resetBoundary(); onReset(); }} > {t('error_boundary.cta')} ) : undefined} ); } export default DefaultErrorScreen;