-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLedgexHome.ios.js
82 lines (74 loc) · 2.21 KB
/
LedgexHome.ios.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
'use strict';
var React = require('react-native');
var {
StyleSheet,
TabBarIOS,
Text,
View,
} = React;
var LedgexList = require('./LedgexList');
var LedgexHome = React.createClass({
getInitialState: function() {
return {
selectedTab: 'contacts',
};
},
_renderContent: function(content: string) {
return (
<LedgexList navigator={this.props.navigator} content={content} auth_headers={this.props.auth_headers}/>
);
},
render: function() {
return (
<TabBarIOS
tintColor="white"
barTintColor="darkslateblue">
<TabBarIOS.Item
title="Contacts"
icon={require('./Contacts-35.png')}
selected={this.state.selectedTab === 'contacts'}
onPress={() => {
this.setState({
selectedTab: 'contacts',
});
}}>
{this._renderContent('contacts')}
</TabBarIOS.Item>
<TabBarIOS.Item
icon={require('./Briefcase-35.png')}
title="Investors"
badge={this.state.notifCount > 0 ? this.state.notifCount : undefined}
selected={this.state.selectedTab === 'investors'}
onPress={() => {
this.setState({
selectedTab: 'investors',
});
}}>
{this._renderContent('investors')}
</TabBarIOS.Item>
<TabBarIOS.Item
icon={require('./Open-Folder-35.png')}
title="Acccount Balances"
selected={this.state.selectedTab === 'balances'}
onPress={() => {
this.setState({
selectedTab: 'balances',
});
}}>
{this._renderContent('balances')}
</TabBarIOS.Item>
</TabBarIOS>
);
},
});
var styles = StyleSheet.create({
tabContent: {
flex: 1,
alignItems: 'center',
},
tabText: {
color: 'white',
margin: 50,
},
});
module.exports = LedgexHome;