-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
43 lines (41 loc) · 1.29 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
import React, { useEffect } from 'react'
import * as eva from '@eva-design/eva'
import SplashScreen from 'react-native-splash-screen'
import { _navigationRef, setIsNavigationReady } from 'infra/navigation'
import { MyStatusBar } from 'components/status-bar'
import { ApplicationProvider, IconRegistry } from '@ui-kitten/components'
import { EvaIconsPack } from '@ui-kitten/eva-icons'
import { mapping, theme } from 'infra/theme'
import { NavigationContainer } from '@react-navigation/native'
import { HomeStack } from 'navigators/home-stack'
import { Toast } from 'components/toast'
import { Alert } from 'components/alert'
import { Confirm } from 'components/confirm'
export const App = () => {
useEffect(() => {
setIsNavigationReady(true)
SplashScreen.hide()
return () => {
setIsNavigationReady(false)
}
}, [])
return (
<>
<MyStatusBar barStyle='dark-content' backgroundColor='#FFF' />
<IconRegistry icons={[EvaIconsPack]} />
<ApplicationProvider
{...eva}
theme={{ ...eva.light, ...theme }}
// @ts-ignore
customMapping={mapping}
>
<NavigationContainer ref={_navigationRef}>
<HomeStack />
</NavigationContainer>
</ApplicationProvider>
<Toast />
<Alert />
<Confirm />
</>
)
}