-
Notifications
You must be signed in to change notification settings - Fork 1
/
AppNavigator.js
43 lines (38 loc) · 1.8 KB
/
AppNavigator.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
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createDrawerNavigator } from '@react-navigation/drawer';
import { createStackNavigator } from '@react-navigation/stack';
import MainPage from "./screens/mainPage";
import LoginPage from "./screens/loginPage";
import RegistrationPage from "./screens/registrationPage";
import PaymentPage from "./screens/paymentPage";
import DonationPage from "./screens/donationPage";
import HistoryPage from "./screens/historyPage";
const Drawer = createDrawerNavigator();
const Stack = createStackNavigator();
export const HomeNavigator = () => {
return(
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Login" component={LoginPage} />
<Stack.Screen name="Register" component={RegistrationPage} />
<Stack.Screen name="MainPage" component={MainPage} />
<Stack.Screen name="Payment" component={PaymentPage} />
<Stack.Screen name="Donation" component={DonationPage} />
<Stack.Screen name="History" component={HistoryPage} />
</Stack.Navigator>
)
}
export const AppNavigator = () => {
return(
<NavigationContainer>
<Drawer.Navigator initialRouteName="Login" screenOptions={{ headerShown: true }}>
<Drawer.Screen name="Login" component={LoginPage} />
<Drawer.Screen name="Register" component={RegistrationPage} />
<Drawer.Screen name="HistoryPage" component={HistoryPage} />
<Drawer.Screen name="MainPage" component={MainPage} />
<Drawer.Screen name="Payment" component={PaymentPage} />
<Drawer.Screen name="Donation" component={DonationPage} />
</Drawer.Navigator>
</NavigationContainer>
)
}