Skip to content

Instantly share code, notes, and snippets.

@rgommezz
Last active June 26, 2017 23:36
Show Gist options
  • Save rgommezz/f860ec334bb170a70db51c99c97ef62d to your computer and use it in GitHub Desktop.
Save rgommezz/f860ec334bb170a70db51c99c97ef62d to your computer and use it in GitHub Desktop.
import React from 'react';
import { withNetworkConnectivity } from 'react-native-offline';
import { View, Text } from 'react-native';
import EventList from './EventList';
const EventsForDay = ({ isConnected, day }) => (
<View style={{ flex: 1 }}>
{isConnected ? <EventList day={day} /> : <Text>We are offline :(</Text>}
</View>
);
export default withNetworkConnectivity()(EventsForDay);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment