import React from 'react';
import {View} from 'react-native';
import {useTranslation} from 'react-i18next';
import Text from '@components/Text';

import {styles} from './styles';

interface Props {
  message?: string;
}

export function ErrorList({message}: Props) {
  const {t} = useTranslation();

  return (
    <View style={styles.container}>
      <Text variant="body1" style={styles.text}>
        {message || t('errors.api.500', {info: ''})}
      </Text>
    </View>
  );
}
