This repository was archived by the owner on Jan 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.js
More file actions
70 lines (62 loc) · 2.72 KB
/
Copy pathMain.js
File metadata and controls
70 lines (62 loc) · 2.72 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
import React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaView, StatusBar } from 'react-native';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Explore from './Tabs/Main/Explore';
import Home from './Tabs/Main/Home';
import MyAccount from './Tabs/Main/MyAccount';
import MyTrip from './Tabs/Main/MyTrip';
const Tab = createBottomTabNavigator();
const Main = ({ navigation }) => {
return (
<SafeAreaView style={{ flex: 1, paddingTop: StatusBar.currentHeight }}>
{/* <NavigationContainer independent={false}> */}
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
if (route.name === 'Home') {
iconName = focused ? 'home' : 'home-outline';
} else if (route.name === 'Explore') {
iconName = focused ? 'navigate-circle' : 'navigate-circle-outline';
} else if (route.name === 'MyTrip') {
iconName = focused ? 'images' : 'images-outline';
} else if (route.name === 'MyAccount') { // Add this condition
iconName = focused ? 'person' : 'person-outline';
}
return <Ionicons name={iconName} size={size} color={color} />;
},
tabBarActiveTintColor: '#39a7ff',
tabBarInactiveTintColor: 'gray',
tabBarStyle: { backgroundColor: '#ffffff' },
style: { backgroundColor: 'white' },
})}
>
<Tab.Screen
name="Home"
component={Home}
options={{ headerShown: false }}
/>
<Tab.Screen
name="Explore"
component={Explore}
options={{ headerShown: false }}
/>
<Tab.Screen
name="MyTrip"
component={MyTrip}
options={{ headerShown: false }}
/>
<Tab.Screen
name="MyAccount"
component={MyAccount}
options={{ headerShown: false }}
/>
</Tab.Navigator>
{/* <ReviewSection /> */}
{/* </NavigationContainer> */}
</SafeAreaView >
);
};
export default Main;