|
@@ -5,6 +5,8 @@ import WebView from "react-native-webview";
|
5
|
5
|
import {withTheme} from 'react-native-paper';
|
6
|
6
|
import HeaderButton from "../Custom/HeaderButton";
|
7
|
7
|
import BasicLoadingScreen from "../Custom/BasicLoadingScreen";
|
|
8
|
+import NetworkErrorComponent from "../Custom/NetworkErrorComponent";
|
|
9
|
+import i18n from "i18n-js";
|
8
|
10
|
|
9
|
11
|
type Props = {
|
10
|
12
|
navigation: Object,
|
|
@@ -104,6 +106,12 @@ class WebViewScreen extends React.PureComponent<Props> {
|
104
|
106
|
injectedJavaScript={this.props.data[0]['customJS']}
|
105
|
107
|
javaScriptEnabled={true}
|
106
|
108
|
renderLoading={this.getRenderLoading}
|
|
109
|
+ renderError={() => <NetworkErrorComponent
|
|
110
|
+ {...this.props}
|
|
111
|
+ onRefresh={this.onRefreshClicked}
|
|
112
|
+ message={i18n.t("loginScreen.errors.connection")}
|
|
113
|
+ icon={'access-point-network-off'}
|
|
114
|
+ />}
|
107
|
115
|
/>
|
108
|
116
|
);
|
109
|
117
|
}
|