-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
48 lines (45 loc) · 1.47 KB
/
App.js
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
import React from 'react'
import { Provider } from 'react-redux'
import { NavigationContainer } from '@react-navigation/native'
import { PersistGate } from 'redux-persist/lib/integration/react'
import { LogBox, ActivityIndicator } from 'react-native'
import FlashMessage, { hideMessage } from 'react-native-flash-message'
import configureStore from './app/state/store'
import VersionTag from './app/components/versionTag/VersionTag'
import { ENV_COLOR, ENV_TAG } from './app/utils/env'
import RootStackScreens from './app/navigation/navigationStack'
import FlashMessageComponent from './app/components/FlashMessageComponent'
import RemixIcon from './app/utils/icon/RemixIcons'
const { persistor, store } = configureStore()
const App = () => {
RemixIcon.loadFont()
LogBox.ignoreLogs(['Warning:'])
LogBox.ignoreAllLogs(true)
return (
<Provider store={store}>
<VersionTag
versionTagText={ENV_TAG}
backgroundColor={ENV_COLOR}
/>
<PersistGate
loading={<ActivityIndicator />}
persistor={persistor}
>
<NavigationContainer>
<RootStackScreens />
</NavigationContainer>
</PersistGate>
<FlashMessage
position="bottom"
renderCustomContent={(options) => (
<FlashMessageComponent
iconName={options.icon}
message={options.customMessage}
onCancelPressed={() => hideMessage()}
/>
)}
/>
</Provider>
)
}
export default App