This repository was archived by the owner on Jun 24, 2021. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathApp.js
More file actions
100 lines (94 loc) · 3.26 KB
/
Copy pathApp.js
File metadata and controls
100 lines (94 loc) · 3.26 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
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
import React from 'react';
import { registerRootComponent } from 'expo';
import Icon from 'react-native-vector-icons/Ionicons'
import {NavigationContainer} from '@react-navigation/native'
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import businessReducer from './redux/reducers/Business';
import {FirstScreenNavigator, SecondScreenNavigator, MyVibeTab} from './CustomNavigation'
import {useRoute} from '@react-navigation/native';
import { Image } from 'react-native';
const Tab = createBottomTabNavigator();
import store from './redux/store';
const App = () => {
return (
<>
<Provider store={store}>
<NavigationContainer>
<Tab.Navigator
initialRouteName = "Screen 1"
tabBarOptions = {{
activeTintColor: 'red',
inactiveTintColor: 'grey',
style: {
backgroundColor: 'white',
borderTopWidth: 0,
shadowOffset: { width: 5, height: 3 },
shadowColor: 'black',
shadowOpacity: 0.5,
elevation: 5
},
}}
>
<Tab.Screen
name="Screen 1"
component={FirstScreenNavigator} // Replaced Screen 1
options = { ({ navigation })=> {
const currentRoute = navigation.state
// const { routeName } = currentRoute;
return{
tabBarVisible: false,
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-list-box" color={tintColor} size={24} />
)
}
}}
/>
{/* <Tab.Screen
name="Screen 2"
component={SecondScreenNavigator} // Replaced Screen 2
options =
{
{
tabBarLabel: 'SAVED',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-heart-outline" color={tintColor} size={24} />
)
}
}
/>
<Tab.Screen
name="Screen 3"
component={ThirdScreenNavigator} // Replaced Screen 3
options =
{
{
tabBarLabel: 'My Vibe',
tabBarIcon: ({ tintColor }) => (
<Image source={require('./assets/airbnb.png')} style={{ height: 24, width: 24, tintColor: tintColor }} />
)
}
}
/>
<Tab.Screen
name="Screen 4"
component={ThirdScreenNavigator} // Replaced Screen 3
options =
{
{
tabBarLabel: 'Profile',
tabBarIcon: ({ tintColor }) => (
<Image source={require('./assets/airbnb.png')} style={{ height: 24, width: 24, tintColor: tintColor }} />
)
}
}
/> */}
</Tab.Navigator>
</NavigationContainer>
</Provider>
</>
);
};
export default App