import { Text, View } from 'react-native';
import { ThemeButton, ThemeText } from './ThemeTypes';

const ErrorDisplay = ({message, onRefresh}) => {
    return (
        <View style={{ marginTop: 30, alignItems: 'center' }}>
          <ThemeText style={{fontWeight: 'bold', fontSize: 20}}>Fehler beim Laden der Daten</ThemeText>
          <ThemeText style={{ margin: 10 }}>{message}</ThemeText>
          <ThemeButton onPress={onRefresh} ><Text>Neu laden</Text></ThemeButton>
        </View>
      );
}

export default ErrorDisplay;