Last active
September 19, 2020 11:14
-
-
Save MKS-01/727d2ee3397fdd5ad36bdf0e7f4bd8b8 to your computer and use it in GitHub Desktop.
Network Error Complete Implementation Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {View, Text, SafeAreaView, StyleSheet, Image} from 'react-native'; | |
import CheckConnection from './utils/CheckConnetion'; | |
const ErrorCard = () => { | |
return ( | |
<View style={styles.errorContainer}> | |
{/*check github repo for design*/} | |
</View> | |
); | |
}; | |
const NetworkTest = () => { | |
let network = CheckConnection(); | |
if (network === false) { | |
return <ErrorCard />; | |
} | |
return ( | |
<SafeAreaView style={styles.rootView}> | |
<View style={styles.rootContainer}> | |
{/*... | |
rest of component | |
...*/} | |
</View> | |
</SafeAreaView> | |
); | |
}; | |
export default NetworkTest; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment