-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathApp.tsx
More file actions
55 lines (47 loc) · 1.46 KB
/
App.tsx
File metadata and controls
55 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import {Platform, StatusBar} from 'react-native';
import {Provider} from 'react-redux';
import {ApolloProvider} from '@apollo/client';
import Toast from 'react-native-toast-message';
import {PersistGate} from 'redux-persist/integration/react';
import {SafeAreaView} from 'react-native-safe-area-context';
// store
import {store, persistor} from './src/store';
// routes
import Layout from './src/routes';
// gql
import client from './src/graphql/ApolloClient';
// contexts
import {ActivityIndicatorProvider} from './src/contexts/ActivityIndicator';
import {FlashcardProvider} from './src/contexts/Flashcard';
// utils
import {toastConfig} from './src/utils/toast';
function App(): React.JSX.Element {
return (
<SafeAreaView style={{flex: 1}}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<StatusBar
barStyle={Platform.OS === 'ios' ? 'dark-content' : 'light-content'}
backgroundColor={'#000'}
/>
<ApolloProvider client={client}>
<ActivityIndicatorProvider>
<FlashcardProvider>
<Layout />
</FlashcardProvider>
<Toast config={toastConfig} />
</ActivityIndicatorProvider>
</ApolloProvider>
</PersistGate>
</Provider>
</SafeAreaView>
);
}
export default App;