Created
April 2, 2018 20:38
-
-
Save Ayyagaries/03e9ff71bed34c7cd842bbcc047073b9 to your computer and use it in GitHub Desktop.
Component
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
render() { | |
console.log(`i am in the render method with this.props.PickFacility.msg ${this.props.PickFacility.msg}`); | |
const displayView = this.props.PickFacility.msg ? ( | |
<View | |
style={{ | |
flex: 1, | |
alignSelf: 'center', | |
marginTop: '50%', | |
}} | |
> | |
<Icon name="exclamation-triangle" color="#C0C0C0" size={30} style={styles.iconStyle} /> | |
<Label style={styles.securetext}>Network Connectivity Error</Label> | |
<Button style={styles.button} onPress={this.handlePrivacyPolicy}> | |
<Label style={styles.buttonLabel}>RETRY</Label> | |
</Button> | |
</View> | |
) : ( | |
<Text> Flat list goes here</Text> | |
); | |
return ( | |
<Container style={styles.container}> | |
<Content> | |
<Spinner | |
visible={this.props.PickFacility.isLoading} | |
textContent="Loading" | |
textStyle={{ color: '#FFF' }} | |
/> | |
{displayView} | |
</Content> | |
</Container> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment