-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigation.js
39 lines (35 loc) · 1.24 KB
/
navigation.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
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import HomeScreen from "./Screens/HomeScreen";
import NewPostScreen from "./Screens/NewPostScreen";
import LoginScreen from "./Screens/LoginScreen";
import SignUpScreen from "./Screens/SignUpScreen";
import UploadDpScreen from "./Screens/UploadDpScreen";
const Stack = createStackNavigator();
const screenOptions = {
headerShown: false,
};
export const SignedInStack = () => (
<NavigationContainer>
<Stack.Navigator
initialRouteName="HomeScreen"
screenOptions={screenOptions}
>
<Stack.Screen name="HomeScreen" component={HomeScreen} />
<Stack.Screen name="NewPostScreen" component={NewPostScreen} />
<Stack.Screen name="UploadDpScreen" component={UploadDpScreen} />
</Stack.Navigator>
</NavigationContainer>
);
export const SignedOutStack = () => (
<NavigationContainer>
<Stack.Navigator
initialRouteName="LoginScreen"
screenOptions={screenOptions}
>
<Stack.Screen name="LoginScreen" component={LoginScreen} />
<Stack.Screen name="SignUpScreen" component={SignUpScreen} />
</Stack.Navigator>
</NavigationContainer>
);