-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppNav.js
222 lines (210 loc) · 6.53 KB
/
AppNav.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
import React, {useEffect, useState} from 'react';
import {View, PermissionsAndroid} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
const Stack = createStackNavigator();
//screens
import BottomTab from './src/navigation/BottomTab';
import {connect} from 'react-redux';
import Splash from './src/screens/Auth/Splash';
import Changepassword from './src/screens/Auth/Changepassword';
import Login from './src/screens/Auth/Login';
import Signup from './src/screens/Auth/Signup';
import Forget from './src/screens/Auth/ForgetPassword';
import Otp from './src/screens/Auth/Otp';
import Settings from './src/screens/App/Settings';
import Home from './src/screens/App/Home';
import Success from './src/screens/App/Success';
import failed from './src/screens/App/failed';
import CommunicationSkills from './src/screens/App/CommunicationSkills';
import Unanswered from './src/screens/App/Unanswered';
import Progress from './src/screens/App/Progress';
import MyProgress from './src/screens/App/MyProgress/MyProgress';
import Notifications from './src/screens/App/Notifications';
import Leaderboard from './src/screens/App/Leaderboard';
import FAQs from './src/screens/App/FAQs/FAQs';
import UpdateProfile from './src/screens/App/UpdateProfile/UpdateProfile';
import {LogBox} from 'react-native';
import AccountSettings from './src/screens/App/Settings/AccountSettings';
import TopTab from './src/screens/App/TopTab/TopTab';
import More from './src/screens/App/More';
import PrivacyPolicy from './src/screens/App/PrivacyPolicy';
import ViewCourses from './src/screens/App/ViewCourses';
import Music from './src/screens/App/Music'
LogBox.ignoreAllLogs();
function AppNav({route}) {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName={'Splash'}>
<Stack.Screen
name="Splash"
component={Splash}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="FAQs"
component={FAQs}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="UpdateProfile"
component={UpdateProfile}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Home"
component={Home}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Music"
component={Music}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Progress"
component={Progress}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="ViewCourses"
component={ViewCourses}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Leaderboard"
component={Leaderboard}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="MyProgress"
component={MyProgress}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Notifications"
component={Notifications}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="PrivacyPolicy"
component={PrivacyPolicy}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Changepassword"
component={Changepassword}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="More"
component={More}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Login"
component={Login}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Signup"
component={Signup}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Forget"
component={Forget}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Otp"
component={Otp}
options={{headerShown: false, animationEnabled: true}}
/>
<Stack.Screen
name="Root"
component={BottomTab}
options={{headerShown: false}}
/>
<Stack.Screen
name="Setting"
component={Settings}
options={{headerShown: false}}
/>
<Stack.Screen
name="CommunicationSkills"
component={CommunicationSkills}
options={{headerShown: false}}
/>
<Stack.Screen
name="Unanswered"
component={Unanswered}
options={{headerShown: false}}
/>
<Stack.Screen
name="AccountSettings"
component={AccountSettings}
options={{headerShown: false}}
/>
<Stack.Screen
name="Success"
component={Success}
options={{headerShown: false}}
/>
<Stack.Screen
name="failed"
component={failed}
options={{headerShown: false}}
/>
<Stack.Screen
name="TopTab"
component={TopTab}
options={{headerShown: false}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
function AppBottom() {
return (
<NavigationContainer>
<Tab.Navigator
initialRouteName="Home"
tabBarOptions={{
activeTintColor: '#42f44b',
}}>
<Tab.Screen
name="Home"
component={Home}
options={{
tabBarLabel: 'Home',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="Unanswered"
component={Unanswered}
options={{
tabBarLabel: 'Settings',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons
name="settings"
color={color}
size={size}
/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
const mapStateToProps = state => {
const {isLoggedIn} = state.auth;
return {
isLoggedIn,
};
};
export default connect(mapStateToProps)(AppNav);