/
App.js
50 lines (44 loc) · 1.42 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
49
50
import React from 'react'
import { registerRootComponent } from 'expo'
import { Provider } from 'react-redux'
import store from './src/redux/store'
import PlutoStatusBar from './src/components/PlutoStatusBar'
import { NavigationContainer } from '@react-navigation/native';
import RootStack, { navigationRef } from './src/navigation'
import { ActionSheetProvider } from '@expo/react-native-action-sheet'
import Toasts from "./src/containers/toasts.container"
import { Colors } from './src/styles/index'
import * as Font from 'expo-font'
class App extends React.Component {
state = {
fontLoaded: false,
}
async componentDidMount() {
await Font.loadAsync({
'europa-regular': require('./src/assets/fonts/europa-regular-webfont.ttf'),
'europa-light': require('./src/assets/fonts/europa-light-webfont.ttf'),
'europa-bold': require('./src/assets/fonts/europa-bold-webfont.ttf'),
})
this.setState({ fontLoaded: true })
}
render() {
console.disableYellowBox = true
return (
<>
<PlutoStatusBar />
{this.state.fontLoaded ? (
<Provider store={store}>
<ActionSheetProvider>
<NavigationContainer ref={navigationRef}>
<RootStack />
<Toasts />
</NavigationContainer>
</ActionSheetProvider>
</Provider>
) : null}
</>
)
}
}
export default App
registerRootComponent(App)