-
Notifications
You must be signed in to change notification settings - Fork 0
/
Navigation.tsx
123 lines (111 loc) · 3.35 KB
/
Navigation.tsx
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
import OnBoardingScreen from "./screens/LoginScreens/OnBoarding";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Ionicons } from "@expo/vector-icons";
import ExploreScreen from "./screens/NavigationScreens/Explore";
import Home from "./screens/NavigationScreens/HomeScreen";
import CalenderScreen from "./screens/NavigationScreens/CalenderScreen";
import UserStackScreen from "./navigation/GlobalStackNavigator";
import LogInScreen from "./screens/LoginScreens/LogIn";
const StackNavigation = createNativeStackNavigator();
const TabNavigation = createBottomTabNavigator();
function HomeScreen() {
return (
<TabNavigation.Navigator
initialRouteName="Home"
screenOptions={{
tabBarActiveTintColor: "#684DEC",
headerShown: false,
}}
>
{/* Home Screen */}
<TabNavigation.Screen
name="Home"
options={{
title: "Home",
// unmountOnBlur: true,
tabBarIcon: ({ focused, color, size }) => {
return (
<Ionicons
name={focused ? "home" : "home-outline"}
size={size}
color={color}
/>
);
},
}}
component={Home}
/>
{/* Calendario */}
<TabNavigation.Screen
name="Calender"
options={{
title: "Calendario",
// unmountOnBlur: true,
tabBarIcon: ({ focused, color, size }) => {
return (
<Ionicons
name={focused ? "calendar" : "calendar-outline"}
size={size}
color={color}
/>
);
},
}}
component={CalenderScreen}
/>
{/* Explore */}
<TabNavigation.Screen
name="Explore"
options={{
title: "Explora",
// unmountOnBlur: true,
tabBarIcon: ({ focused, color, size }) => {
return (
<Ionicons
name={focused ? "map" : "map-outline"}
size={size}
color={color}
/>
);
},
}}
component={ExploreScreen}
/>
{/* Usuario */}
<TabNavigation.Screen
name="User"
options={{
title: "Usuario",
tabBarIcon: ({ focused, color, size }) => {
return (
<Ionicons
name={focused ? "person-circle" : "person-circle-outline"}
size={size}
color={color}
/>
);
},
headerShown: false,
unmountOnBlur: true,
// notificaciones
// tabBarBadge: 0,
}}
component={UserStackScreen}
/>
</TabNavigation.Navigator>
);
}
function Auth(props: any) {
return (
<NavigationContainer>
<StackNavigation.Navigator screenOptions={{ headerShown: false }}>
<StackNavigation.Screen name="OnBoarding" component={OnBoardingScreen} />
<StackNavigation.Screen name="HomeScreen" component={HomeScreen} />
<StackNavigation.Screen name="LogIn" component={LogInScreen} />
</StackNavigation.Navigator>
</NavigationContainer>
);
}
export default Auth;