-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStackNav.js
161 lines (154 loc) · 4.34 KB
/
StackNav.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import React from "react";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import ProductListSceen from "../Screens/ProductListSceen";
import StackNavHeader from "./Navigation_Components/StackNavHeader";
import ProductDetailScreen from "../Screens/ProductDetailScreen";
import CatagoryScreen from "../Screens/CatagoryScreen";
import HomeScreen from "../Screens/HomeScreen";
import CartScreen from "../Screens/CartScreen";
import SearchScreen from "../Screens/SearchScreen";
import UserAccount from "../Screens/UserAccount";
import TopTabBar from "./TopTabBar";
import Selling from "../Screen_Components/HomeScreen_Components/Selling";
import CheckoutScreen from "../Screens/CheckoutScreen";
import PurchaseScreen from "../Screens/PurchaseScreen";
import WatchingTabBar from '../Screen_Components/WatchingScreen Components/WatchingTabBar'
import SearchByImage from "../Screens/SearchByImage";
import ModalStackNav from "./ModalStackNav";
import NewPaymentCard from "../Screen_Components/CheckoutScreen_Components/NewPaymentCard";
import { AuthContext } from "../ContextProvider/useAuth";
const StackNav = () => {
const Stack = createNativeStackNavigator();
const { demo, user } = React.useContext(AuthContext);
return (
<Stack.Navigator
mode="modal"
headerMode="none"
screenOptions={{
cardStyle: { backgroundColor: "transparent" },
cardOverlayEnabled: true,
}}
>
<Stack.Screen
name="Home Screen"
component={HomeScreen}
options={{
header: () => {
return <StackNavHeader title={"Home" } />;
},
}}
/>
<Stack.Screen
name="CheckoutScreen"
component={CheckoutScreen}
options={{
title: "Checkout",
headerTitleStyle: { fontWeight: "bold" },
}}
/>
<Stack.Screen
name="PurchaseScreen"
component={PurchaseScreen}
options={{
title: "Purchases",
headerTitleStyle: { fontWeight: "bold" },
}}
/>
<Stack.Screen
name="WatchingTabBar"
component={WatchingTabBar}
options={{
title: "Wishlist",
headerTitleStyle: { fontWeight: "bold",fontSize:22},
}}
/>
<Stack.Screen
name="SearchByImage"
component={SearchByImage}
options={{
header: () => {
return <StackNavHeader title={"Search by Image"} />;
},
}}
/>
<Stack.Screen
name="Selling"
component={Selling}
options={{
header: () => {
return <StackNavHeader title={"Stores"} />;
},
}}
/>
<Stack.Screen
name="UserAccount"
component={UserAccount}
options={{
header: () => {
return <StackNavHeader title={"My Profile"} />;
},
}}
/>
<Stack.Screen
name="TabBar"
component={TopTabBar}
options={{
title: user?.username,
}}
/>
<Stack.Screen
name="SearchScreen"
component={SearchScreen}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="ShoppingItem"
component={CartScreen}
options={{
header: () => {
return <StackNavHeader title={"Shopping Cart"} />;
},
}}
/>
<Stack.Screen
name="eBay"
component={ProductListSceen}
options={{
header: () => {
return <StackNavHeader title={"Items"} />;
},
}}
/>
<Stack.Screen
name="NewPaymentCardScreen"
component={NewPaymentCard}
options={{
title: "Card Details",
headerTitleStyle: { fontWeight: "bold" },
}}
/>
<Stack.Screen
name="Catagories"
component={CatagoryScreen}
options={{
header: () => {
return <StackNavHeader title={"Catagories"} />;
},
}}
/>
<Stack.Screen
name="ProductDetail"
component={ProductDetailScreen}
options={{
header: () => {
return <StackNavHeader title={"Item"} />;
},
}}
/>
<Stack.Screen name="ModalStackNav" component={ModalStackNav} />
</Stack.Navigator>
);
};
export default StackNav;