Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Ayyagaries/03e9ff71bed34c7cd842bbcc047073b9 to your computer and use it in GitHub Desktop.
Save Ayyagaries/03e9ff71bed34c7cd842bbcc047073b9 to your computer and use it in GitHub Desktop.
Component
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