-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
56 lines (51 loc) · 2.26 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
54
55
56
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react'
import {LogBox} from 'react-native'
import {RootNavigator} from 'src/navigation/root/root.navigator'
import {NavigationContainer} from '@react-navigation/native'
import {SafeAreaProvider} from 'react-native-safe-area-context'
import {Provider} from 'react-redux'
import {store} from 'src/store/store'
import {ThemeProvider, useTheme} from 'src/theme/theme.context'
import {DARK_THEME} from 'src/theme/dark.theme'
import {IsLoadingProvider} from 'src/shared/providers/isLoadingProvider/isLoading.provider'
import {MenuProvider} from 'react-native-popup-menu'
import {MyDialogProvider} from 'src/shared/providers/myDialogProvider/myDialog.provider'
import 'react-native-get-random-values'
import {MyRealmProvider} from 'src/shared/providers/myRealmProvider/myRealm.provider'
import Toastable from 'react-native-toastable'
import {SettingsProvider} from 'src/shared/providers/settingsProvider/settings.provider'
// for disabling warning when passing function to navigation params, but be careful is you use DeepLinking or persisting state
LogBox.ignoreLogs(['Non-serializable values were found in the navigation state'])
function App(): JSX.Element {
const theme = DARK_THEME
const appTheme = useTheme()
return (
<Provider store={store}>
<ThemeProvider initial={theme}>
<SafeAreaProvider style={{backgroundColor: appTheme.theme.color.background}}>
<NavigationContainer>
<MyRealmProvider>
<IsLoadingProvider>
<SettingsProvider>
<MenuProvider>
<MyDialogProvider>
<RootNavigator />
</MyDialogProvider>
</MenuProvider>
</SettingsProvider>
</IsLoadingProvider>
</MyRealmProvider>
</NavigationContainer>
</SafeAreaProvider>
<Toastable />
</ThemeProvider>
</Provider>
)
}
export default App