-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
67 lines (64 loc) · 2.01 KB
/
App.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
import React from 'react';
import { createAppContainer, createSwitchNavigator } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createBottomTabNavigator } from 'react-navigation-tabs';
import AccountScreen from './src/screens/AccountScreen';
import SigninScreen from './src/screens/SigninScreen';
import SignupScreen from './src/screens/SignupScreen';
import InterestPointsScreen from './src/screens/InterestPointsScreen';
import { Provider as AuthProvider } from './src/context/AuthContext';
import { setNavigator } from './src/navigationRef';
import ResolveAuthScreen from './src/screens/ResolveAuthScreen';
import { Provider as LocationProvider } from './src/context/LocationContext';
import MapScreen from './src/screens/MapScreen';
import { FontAwesome } from '@expo/vector-icons';
const switchNavigator = createSwitchNavigator({
ResolveAuth: ResolveAuthScreen,
loginFlow: createStackNavigator({
Signup: SignupScreen,
Signin: SigninScreen,
}),
mainFlow: createBottomTabNavigator({
InterestScreen:{
screen: InterestPointsScreen,
navigationOptions: {
tabBarLabel: 'Interest Screen',
tabBarIcon: ({ tintColor }) => (
<FontAwesome name="map-marker" size={24} color="black" />
)
}
},
Map:{
screen: MapScreen,
navigationOptions: {
tabBarLabel: 'Map',
tabBarIcon: ({ tintColor }) => (
<FontAwesome name="map-o" size={24} color="black" />
)
}
},
Account: {
screen : AccountScreen,
navigationOptions: {
tabBarLabel: 'Account',
tabBarIcon: ({ tintColor }) => (
<FontAwesome name="user" size={24} color="black" />
)
}
},
}),
});
const App = createAppContainer(switchNavigator);
export default () => {
return (
<LocationProvider>
<AuthProvider>
<App
ref={(navigator) => {
setNavigator(navigator);
}}
/>
</AuthProvider>
</LocationProvider>
);
};