-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigation.tsx
More file actions
144 lines (130 loc) · 5.5 KB
/
Navigation.tsx
File metadata and controls
144 lines (130 loc) · 5.5 KB
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
import { Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { StatusBar } from 'expo-status-bar';
import CourseScreen from './Screen/CourseScreen';
import Icon from 'react-native-vector-icons/FontAwesome'
import { Home } from './Screen/Home';
import { Search } from './Screen/Search';
import { Play } from './Screen/Play';
import { User } from './Screen/User';
import LiveCourse from './Screen/LiveCourse';
import AffordableCourse from './Screen/AffordableCourse';
import CommunityCourse from './Screen/CommunityCourse';
import TestSeries from './Screen/TestSeries';
export default function Navigation() {
const Stack = createNativeStackNavigator();
function StackGroup() {
return (
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name='HomeGroup' component={TabGroup} />
<Stack.Screen
name='LiveCourse'
component={LiveCourse}
options={{
presentation: "modal",
headerTitle: "Live Course",
headerShown: true,
headerStyle: {
backgroundColor: '#232D3F',
},
headerTintColor: '#fff',
}}
/>
<Stack.Screen
name='AffordableCourse'
component={AffordableCourse}
options={{
presentation: "modal",
headerTitle: "Affordable Course",
headerShown: true,
headerStyle: {
backgroundColor: '#232D3F',
},
headerTintColor: '#fff',
}}
/>
<Stack.Screen
name='CommunityCourse'
component={CommunityCourse}
options={{
presentation: "modal",
headerTitle: "Community Course",
headerShown: true,
headerStyle: {
backgroundColor: '#232D3F',
},
headerTintColor: '#fff',
}}
/>
<Stack.Screen
name='TestSeries'
component={TestSeries}
options={{
presentation: "modal",
headerTitle: "Test Series",
headerShown: true,
headerStyle: {
backgroundColor: '#232D3F',
},
headerTintColor: '#fff',
}}
/>
<Stack.Screen
name='Course'
component={CourseScreen}
options={{
presentation: "modal",
}}
/>
</Stack.Navigator>
)
}
const Tab = createBottomTabNavigator();
function TabGroup() {
return (
<Tab.Navigator
detachInactiveScreens
screenOptions={{
tabBarInactiveTintColor: '#fff',
tabBarActiveTintColor: '#ff0000',
headerShown: false,
tabBarStyle: {
backgroundColor: "#111",
justifyContent: 'space-between',
alignItems: 'center',
},
tabBarShowLabel: false,
}}
>
<Tab.Screen
name="Home"
options={{ tabBarIcon: ({ color, size, focused }) =><Icon name='home' size={20} color={color} style={{backgroundColor: focused && "#232D3F", padding: 4, borderRadius: 100}} /> } }
component={Home}
/>
<Tab.Screen
name="Search"
options={{ tabBarIcon: ({ color, focused }) => <Icon name='search' size={20} color={color} style={{backgroundColor: focused && "#232D3F", padding: 4, borderRadius: 100}} /> } }
component={Search}
/>
<Tab.Screen
name="Play"
options={{ tabBarIcon: ({ color, focused }) =><Icon name='play-circle' size={20} color={color} style={{backgroundColor: focused && "#232D3F", padding: 6, borderRadius: 100}} /> } }
component={Play}
/>
<Tab.Screen
name="User"
options={{ tabBarIcon: ({ color, focused }) =><Icon name='user-circle' size={20} color={color} style={{backgroundColor: focused && "#232D3F", padding: 4, borderRadius: 100}} /> } }
component={User}
/>
</Tab.Navigator>
)
}
return (
<NavigationContainer>
<StatusBar backgroundColor='#111' style='light' />
<StackGroup />
</NavigationContainer>
)
}