-
Notifications
You must be signed in to change notification settings - Fork 0
/
Router.js
129 lines (110 loc) · 3.46 KB
/
Router.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import React from 'react';
import {View} from 'react-native';
import {TabNavigator, StackNavigator} from 'react-navigation';
import { Icon } from 'react-native-elements';
import {colors} from './common_styles';
//Containers
import ListContactContainer from './containers/list_contacts/list_contacts_container';
import ContactContainer from './containers/contact/contact_container';
import UpsertContainer from './containers/contact/contact_upsert_container';
//Components
import Menu_Container from './containers/menu/menu_container';
export const ContactsStack = StackNavigator({
ListContacts:{
screen:ListContactContainer,
title:'ListContacts'
},
Contact:{
screen:ContactContainer,
},
Upsert:{
screen:UpsertContainer
}
},
{
initialRouteName:('ListContacts'),
headerMode:'none'
}
)
// export const Root = TabNavigator({
// Contacts:{
// screen:ContactsStack,
// navigationOptions:{
// tabBarLabel:'Contacts',
// tabBarIcon:({tintColor,focused})=>(
// <Icon name="person" size={40} color={tintColor} />
// )
// }
// },
// },
// {
// initialRouteName:'Contacts',
// tabBarPosition:'bottom',
// headerMode:'none',
// tabBarOptions:{
// activeTintColor:colors.accent,
// inactiveTintColor:colors.textColor,
// activeBackgroundColor:colors.background,
// inactiveBackgroundColor:colors.background,
// style:{
// backgroundColor:colors.background,
// // position:'relative',
// // left:0,
// // bottom:0,
// // zIndex:3000
// },
// indicatorStyle:{width:0},
// showIcon:true,
// iconStyle:{width:50,height:40},
// upperCaseLabel:false
// }
// }
// )
// let ListContacts = ({navigation})=>(<ListContactContainer navigation={navigation} coreState={props.coreState}/>);
// let MenuComp = ({navigation})=>(<Menu_Container navigation={navigation}/>);
// let Contact = ({navigation})=>(<ContactContainer navigation={navigation}/>);
// export const Router = DrawerNavigator(
// {
// ListContacts:{
// screen:this.ListContacts
// },
// Contact:{
// screen:this.Contact
// }
// },
// {
// initialRouteName:'Contact',
// contentComponent: this.MenuComp,
// drawerWidth:300
// }
// );
// export default class Router extends React.Component{
// constructor(props){
// super(props)
// this.ListContacts = ({navigation})=>(<ListContactContainer navigation={navigation} coreState={this.props.coreState}/>);
// this.MenuComp = ({navigation})=>(<Menu_Container navigation={navigation}/>);
// this.Contact = ({navigation})=>(<ContactContainer navigation={navigation}/>);
// this.nav = DrawerNavigator(
// {
// ListContacts:{
// screen:this.ListContacts
// },
// Contact:{
// screen:this.Contact
// }
// },
// {
// initialRouteName:'Contact',
// contentComponent: this.MenuComp,
// drawerWidth:300
// }
// ).bind(this);
// }
// render(){
// return(
// <View style={{flex:1}}>
// <this.nav/>
// </View>
// )
// }
// }