-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDelegate.js
95 lines (86 loc) · 1.84 KB
/
Delegate.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import React, {Component, Fragment} from 'react'
import {
View,
StyleSheet,
Text,
StatusBar,
ActivityIndicator,
} from 'react-native'
import {GalioProvider} from 'galio-framework';
import {connect} from 'react-redux';
import {startApp} from './state/actions/startApp';
import Loading from "./patch/Loading";
import {monoTheme} from './constants';
import AppContainer from './navigation/Screens';
import Canvas from 'react-native-canvas';
class Delegate extends Component {
componentDidMount() {
this.props.startApp();
}
render() {
const {root, auth} = this.props.mono;
return (
<GalioProvider theme={monoTheme}>
<StatusBar barStyle="light-content"/>
<View style={styles.root}>
{root.loading ? (
<View style={styles.root}>
<Loading
color={'#3ECD9A'}
size={'small'}
/>
</View>
) : (
<AppContainer
isLoggedIn={!!auth.token}
brokerId={auth.brokerId}
/>
)
}
</View>
</GalioProvider>
)
}
}
const styles = StyleSheet.create({
root: {
flex: 1,
backgroundColor: '#000'
},
container: {
flex: 1,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#000000'
},
containerBrand: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
border: {
borderWidth: 8,
borderRightColor: '#CD603E',
marginRight: 8
},
mono: {
fontSize: 24,
fontWeight: 'bold',
color: '#FFF',
marginRight: 10
},
logo: {
fontSize: 24,
fontWeight: 'bold',
color: '#3ECD9A'
},
desc: {
fontSize: 14,
marginTop: 16,
color: '#fff'
},
});
export default connect(state => state, {
startApp
})(Delegate)