// @flow import * as React from 'react'; import {Button, Subheading, withTheme} from 'react-native-paper'; import {StyleSheet, View} from "react-native"; import {MaterialCommunityIcons} from "@expo/vector-icons"; import i18n from 'i18n-js'; type Props = { message: string, icon: string, onRefresh: Function, } type State = { refreshing: boolean, } class NetworkErrorComponent extends React.PureComponent { colors: Object; state = { refreshing: false, }; constructor(props) { super(props); this.colors = props.theme.colors; } render() { return ( {this.props.message} ); } } const styles = StyleSheet.create({ outer: { height: '100%', }, inner: { marginTop: 'auto', marginBottom: 'auto', }, iconContainer: { marginLeft: 'auto', marginRight: 'auto', marginBottom: 20 }, subheading: { textAlign: 'center', }, button: { marginTop: 10, marginLeft: 'auto', marginRight: 'auto', } }); export default withTheme(NetworkErrorComponent);