-
Notifications
You must be signed in to change notification settings - Fork 4
/
AuthStack.tsx
35 lines (28 loc) · 1.15 KB
/
AuthStack.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
import React from 'react';
import { NativeStackNavigationProp, createNativeStackNavigator } from '@react-navigation/native-stack';
import SignUpScreen from './src/screens/SignUp';
import LoginScreen from './src/screens/Login'
import ForgotPasswordScreen from './src/screens/ForgotPassword';
import { useNavigation } from '@react-navigation/native';
import { RootStackParamList } from './RootStack';
export type AuthStackParamList = {
Login: undefined;
SignUp: undefined;
ForgotPassword: undefined;
};
type AuthScreenNavigationProp = NativeStackNavigationProp<AuthStackParamList>;
type RootScreenNavigationProp =
NativeStackNavigationProp<RootStackParamList>;
const Stack = createNativeStackNavigator<AuthStackParamList>();
export default function AuthStack() {
const navigation = useNavigation<AuthScreenNavigationProp>();
const navigationRoot =
useNavigation<RootScreenNavigationProp>();
return (
<Stack.Navigator>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="SignUp" component={SignUpScreen} />
<Stack.Screen name="ForgotPassword" component={ForgotPasswordScreen} />
</Stack.Navigator>
);
}