-
Notifications
You must be signed in to change notification settings - Fork 28
/
App.tsx
53 lines (48 loc) · 1.45 KB
/
App.tsx
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
import 'react-native-gesture-handler'
import { Colors } from '@/Constants'
import ApplicationNavigator from '@/Navigators/Application'
import { persistor, store } from '@/Stores'
import React from 'react'
import Toast from 'react-native-toast-message'
import { Provider } from 'react-redux'
import { MD3LightTheme as DefaultTheme, PaperProvider } from 'react-native-paper'
import { PersistGate } from 'redux-persist/integration/react'
import { QueryClient, QueryClientProvider } from 'react-query'
import { StatusBar, StyleSheet, View } from 'react-native'
export const queryClient = new QueryClient({
defaultOptions: {
queries: { refetchOnWindowFocus: 'always', retry: false },
mutations: {},
},
})
const theme = {
...DefaultTheme,
// Specify custom property in nested object
colors: {
...DefaultTheme.colors,
},
}
const App = () => (
<>
<Provider store={store}>
<PaperProvider theme={theme}>
<PersistGate persistor={persistor} loading={null}>
<QueryClientProvider client={queryClient}>
<View style={styles.container}>
<StatusBar barStyle={'dark-content'} backgroundColor={Colors.white} />
<ApplicationNavigator />
<Toast />
</View>
</QueryClientProvider>
</PersistGate>
</PaperProvider>
</Provider>
</>
)
export default App
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#EFF4FF',
},
})