-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
36 lines (34 loc) · 1.18 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
/**
*
* @format
*/
import React, {Component} from 'react'
import {Provider} from 'unstated'
import {StatusBar} from 'react-native'
import {NavigationContainer} from '@react-navigation/native'
import LocationListener from './src/components/LocationListener'
import LocationStorageContainer from './src/containers/LocationStorageContainer'
import CovidStatusContainer from './src/containers/CovidStatusContainer'
import HotspotsContainer from './src/containers/HotspotsContainer'
import OnboardingStack from './src/navigation/OnboardingStack'
export default class App extends Component {
async componentDidMount() {
global.apiConfig = {
url: this.props.apiUrl,
}
}
render() {
const locationStorage = new LocationStorageContainer(this.props)
const statusStorage = new CovidStatusContainer(this.props)
const hotspotStorage = new HotspotsContainer(this.props)
return (
<Provider inject={[locationStorage, statusStorage, hotspotStorage]}>
<StatusBar barStyle="light-content" />
<NavigationContainer>
<OnboardingStack />
</NavigationContainer>
<LocationListener locationStorage={locationStorage} />
</Provider>
)
}
}