-
Notifications
You must be signed in to change notification settings - Fork 0
/
StackNavigator.js
139 lines (132 loc) · 4.27 KB
/
StackNavigator.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
import { StyleSheet, Text, View } from "react-native";
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import HomeScreen from "./screens/HomeScreen";
import { AntDesign } from "@expo/vector-icons";
import { Entypo } from "@expo/vector-icons";
import { Ionicons } from "@expo/vector-icons";
import SavedScreen from "./screens/SavedScreen";
import BookingScreen from "./screens/BookingScreen";
import ProfileScreen from "./screens/ProfileScreen";
import { NavigationContainer } from "@react-navigation/native";
import SearchScreen from "./screens/SearchScreen";
import PlacesScreen from "./screens/PlacesScreen";
import MapScreen from "./screens/MapScreen";
import PropertyInfoScreen from "./screens/PropertyInfoScreen";
import RoomsScreen from "./screens/RoomsScreen";
import UserScreen from "./screens/UserScreen";
import ConfirmationScreen from "./screens/ConfirmationScreen";
import LoginScreen from "./screens/LoginScreen";
import RegisterScreen from "./screens/RegisterScreen";
const StackNavigator = () => {
const Tab = createBottomTabNavigator();
const Stack = createNativeStackNavigator();
function BottomTabs() {
return (
<Tab.Navigator>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarLabel: "Home",
headerShown: false,
tabBarIcon: ({ focused }) =>
focused ? (
<Entypo name="home" size={24} color="#003580" />
) : (
<AntDesign name="home" size={24} color="black" />
),
}}
/>
<Tab.Screen
name="Saved"
component={SavedScreen}
options={{
tabBarLabel: "Saved",
headerShown: false,
tabBarIcon: ({ focused }) =>
focused ? (
<AntDesign name="heart" size={24} color="#003580" />
) : (
<AntDesign name="hearto" size={24} color="black" />
),
}}
/>
<Tab.Screen
name="Bookings"
component={BookingScreen}
options={{
tabBarLabel: "Bookings",
headerShown: false,
tabBarIcon: ({ focused }) =>
focused ? (
<Ionicons name="notifications" size={24} color="#003580" />
) : (
<Ionicons
name="notifications-outline"
size={24}
color="black"
/>
),
}}
/>
<Tab.Screen
name="Profile"
component={ProfileScreen}
options={{
tabBarLabel: "Profile",
headerShown: false,
tabBarIcon: ({ focused }) =>
focused ? (
<Ionicons name="person" size={24} color="#003580" />
) : (
<Ionicons name="person-outline" size={24} color="black" />
),
}}
/>
</Tab.Navigator>
);
}
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Login"
component={LoginScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Register"
component={RegisterScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Main"
component={BottomTabs}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Search"
component={SearchScreen}
options={{ headerShown: false }}
/>
<Stack.Screen name="Places" component={PlacesScreen} />
<Stack.Screen
name="Map"
component={MapScreen}
options={{ headerShown: false }}
/>
<Stack.Screen name="Info" component={PropertyInfoScreen} />
<Stack.Screen name="Rooms" component={RoomsScreen} />
<Stack.Screen name="User" component={UserScreen} />
<Stack.Screen
name="ConfirmationScreen"
component={ConfirmationScreen}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default StackNavigator;
const styles = StyleSheet.create({});