/
index.js
103 lines (97 loc) · 2.13 KB
/
index.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
import React from 'react';
import { Platform } from 'react-native';
import { TabNavigator, StackNavigator } from 'react-navigation';
import { Ionicons as Icon } from '@expo/vector-icons';
import { Colors } from './constants';
import Explore from './screens/Explore';
import AllMessages from './screens/AllMessages';
import Profile from './screens/Profile';
import UserProfile from './screens/UserProfile';
import Chat from './screens/Chat';
const HomeTabs = TabNavigator({
Explore: {
screen: Explore,
navigationOptions: {
title: 'Explore',
tabBarIcon: ({ tintColor }) => (
<Icon
name="ios-beer"
color={tintColor}
size={24}
/>
)
}
},
Messages: {
screen: AllMessages,
navigationOptions: {
title: 'Messages',
tabBarIcon: ({ tintColor }) => (
<Icon
name="ios-chatboxes"
color={tintColor}
size={28}
style={{ marginTop: 4 }}
/>
)
}
},
Profile: {
screen: Profile,
navigationOptions: {
title: 'Profile',
tabBarIcon: ({ tintColor }) => (
<Icon
name="ios-person"
color={tintColor}
size={32}
style={{ marginTop: 2 }}
/>
)
}
}
}, {
tabBarOptions: {
activeTintColor: '#F87961',
style: {
backgroundColor: 'white',
borderTopWidth: 0,
shadowOpacity: 0.05,
shadowRadius: 4
}
}
});
const HomeNavigator = StackNavigator(
{
HomeTabs: { screen: HomeTabs },
Chat: { screen: Chat },
},
{
navigationOptions: {
headerTintColor: Colors.primaryColor,
headerStyle: {
backgroundColor: '#FFF'
},
headerTitleStyle: {
fontWeight: '800',
color: Colors.textColor
}
}
}
)
/**
* Base level navigator
* This Stack navigator is special because it
* can display modals on any screen
*/
const AppNavigator = StackNavigator(
{
HomeNavigator: { screen: HomeNavigator },
UserProfile: { screen: UserProfile }
},
{
headerMode: 'none',
mode: Platform.OS === 'ios' ? 'modal' : 'card'
}
);
export default AppNavigator;