Last active
June 26, 2017 23:35
-
-
Save rgommezz/8cda5056c34235d6d8be1139dc433b05 to your computer and use it in GitHub Desktop.
This file contains 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, { Component } from 'react'; | |
import { | |
View, | |
ScrollView, | |
StyleSheet, | |
} from 'react-native'; | |
import { ConnectivityRenderer } from 'react-native-offline'; | |
// Rest of component imports ... | |
class EventDetailsScreen extends Component { | |
render() { | |
const { event } = this.props; | |
return ( | |
<ScrollView style={styles.container}> | |
<EventCover uri={event.uri} /> | |
<View style={styles.content}> | |
<EventBasicInformation | |
data={event.basicInfo} | |
/> | |
<ConnectivityRenderer> | |
{isConnected => isConnected && <EventLocation | |
address={event.fullAddress} | |
eventId={event.eventId} | |
/>} | |
</ConnectivityRenderer> | |
<EventDescription description={event.description} /> | |
<ConnectivityRenderer> | |
{isConnected => <RsvpButtons disabled={!isConnected} />} | |
</ConnectivityRenderer> | |
</View> | |
<ConnectivityRenderer> | |
{isConnected => ( | |
<SnackBar | |
message="You are currently offline, some features may be disabled" | |
predicate={!isConnected} | |
/> | |
)} | |
</ConnectivityRenderer> | |
</ScrollView> | |
); | |
} | |
} | |
export default EventDetailsScreen; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment