-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
86 lines (82 loc) · 2.64 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import React from "react";
import { StatusBar } from "expo-status-bar";
import { StyleSheet, View } from "react-native";
import Home from "./screens/Home";
import Cart from "./screens/Cart";
import Favorites from "./screens/Favorites";
import OrderHistory from "./screens/OrderHistory";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Entypo } from "@expo/vector-icons";
import { FontAwesome5 } from "@expo/vector-icons";
import { AntDesign } from "@expo/vector-icons";
import { Ionicons } from "@expo/vector-icons";
const Tab = createBottomTabNavigator();
export default function App() {
return (
<View style={styles.container}>
<NavigationContainer>
<Tab.Navigator
initialRouteName="Home"
screenOptions={{
tabBarLabelPosition: "beside-icon",
tabBarShowLabel: false,
tabBarActiveTintColor: "#D17842",
tabBarInactiveTintColor: "#52555A",
tabBarStyle: {
backgroundColor: "#0d0f14",
borderTopWidth: 0,
},
}}
>
<Tab.Screen
name="Home"
component={Home}
options={{
tabBarIcon: ({ color, size }) => (
<Entypo name="home" color={color} size={size} />
),
headerShown: false, // Hide header for Home screen
}}
/>
<Tab.Screen
name="Cart"
component={Cart}
options={{
tabBarIcon: ({ color, size }) => (
<FontAwesome5 name="shopping-bag" size={size} color={color} />
),
headerShown: false, // Hide header for Cart screen
}}
/>
<Tab.Screen
name="Favorites"
component={Favorites}
options={{
tabBarIcon: ({ color, size }) => (
<AntDesign name="heart" size={size} color={color} />
),
headerShown: false, // Hide header for Favorites screen
}}
/>
<Tab.Screen
name="OrderHistory"
component={OrderHistory}
options={{
tabBarIcon: ({ color, size }) => (
<Ionicons name="notifications" size={size} color={color} />
),
headerShown: false, // Hide header for OrderHistory screen
}}
/>
</Tab.Navigator>
</NavigationContainer>
<StatusBar style="light" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});