forked from CelsiusNetwork/lender-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
46 lines (39 loc) · 995 Bytes
/
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
import React from 'react'
import Expo, { Constants } from 'expo'
import { Platform, StyleSheet, View } from 'react-native'
import App from './src/App'
import Sentry from 'sentry-expo'
Sentry.enableInExpoDevelopment = true
Sentry.config('https://2c8b64f01d8143c18d85e07c0b440b5f:[email protected]/272080').install()
Sentry.setTagsContext({
'environment': process.env.NODE_ENV,
'react': true
})
export default class AppInit extends React.Component {
constructor () {
super()
this.state = {
isReady: false
}
}
async componentWillMount () {
this.setState({ isReady: true })
}
renderStatusBar () {
if (Platform.OS === 'android') { return <View style={styles.statusBar} /> }
}
render () {
if (!this.state.isReady) {
return <Expo.AppLoading />
}
return (
<App />
)
}
}
const styles = StyleSheet.create({
statusBar: {
backgroundColor: '#332fc2',
height: Constants.statusBarHeight
}
})