index.js
1.42 KB
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
/**
* Created by Cassie on 208/03/21.
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text
} from 'react-native';
import {StackNavigator,TabNavigator} from 'react-navigation';
import {getHeaderPadding,getHeaderHeight,getFooterBottom} from "./utils/utils";
import SignIn from "./pages/signIn";
import Home from "./pages/home";
// const FirstPage = TabNavigator({
// Home:{screen:Home}
// },{
// tabBarPosition:'bottom'
// });
const Navigator = StackNavigator(
{
// SignIn:{screen:SignIn},
Home:{screen:Home}
},
{
navigationOptions:{
headerStyle:{
paddingTop:getHeaderPadding(),
height:getHeaderHeight(),
backgroundColor:'#f8f8f8',
},
headerTitleStyle:{
alignSelf:'center',
alignItems:'center',
justifyContent:'center',
flexDirection:'column',
fontSize:18,
color:'#000'
}
}
}
);
class Index extends Component {
constructor(props) {
super(props);
this.state = {};
}
render(){
return(
<View style={styles.root}>
<Navigator />
</View>
);
}
}
const styles = StyleSheet.create({
root:{
flex:1,
marginBottom:getFooterBottom(),
}
});
export default Index;