forked from Olympiah/remed_mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStackNavigator.js
More file actions
117 lines (112 loc) · 4.12 KB
/
Copy pathStackNavigator.js
File metadata and controls
117 lines (112 loc) · 4.12 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
import * as React from "react";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import HomeScreen from "./screens/HomeScreen";
import DoctorDash from "./screens/dashboard/DoctorDash";
import PatientDash from "./screens/dashboard/PatientDash";
import DoctorProfileScreen from "./screens/Profiles/DoctorProfileScreen";
import PatientProfileScreen from "./screens/Profiles/PatientProfileScreen";
import Notes from "./screens/Notes/Notes";
import AddNote from "./screens/Notes/AddNote";
import Landing from "./screens/Landing";
import Signin from "./screens/Loginscreens/Signin";
import Signup from "./screens/Loginscreens/Signup";
import Faqs from "./screens/Others/Faqs";
import Complaints from "./screens/Others/Complaints";
import useAuth from "./hooks/useAuth";
import Doctor from './screens/Details/Doctor'
import Patient from "./screens/Details/Patient";
import DocPat from "./screens/Loginscreens/DocPat";
const Stack = createNativeStackNavigator();
const Tab = createNativeStackNavigator();
const StackNavigator = () => {
const { user } = useAuth()
function Land() {
return (
<Tab.Navigator>
<Tab.Screen
options={{ headerShown: false }}
name="Landing"
component={Landing}
/>
<Tab.Screen
options={{ headerShown: false }}
name="Signin"
component={Signin}
/>
<Tab.Screen
options={{ headerShown: false }}
name="Signup"
component={Signup}
/>
<Tab.Screen
options={{ headerShown: false }}
name="Patient"
component={Patient}
/>
<Tab.Screen
options={{ headerShown: false }}
name="DocPat"
component={DocPat}
/>
<Tab.Screen
options={{ headerShown: false }}
name="Doctor"
component={Doctor}
/>
</Tab.Navigator>
);
}
return (
<Stack.Navigator
>
{user ? (
<Stack.Group>
<Stack.Screen
options={{ headerShown: false }}
name="Home"
component={HomeScreen}
/>
<Stack.Screen
options={{ headerShown: false }}
name="DoctorProfile"
component={DoctorProfileScreen}
/>
<Stack.Screen
options={{ headerShown: false }}
name="PatientProfile"
component={PatientProfileScreen}
/>
<Stack.Screen
options={{ headerShown: false }}
name="DoctorDash"
component={DoctorDash}
/>
<Stack.Screen
options={{ headerShown: false }}
name="PatientDash"
component={PatientDash}
/>
<Stack.Screen name="Complaints" component={Complaints} />
<Stack.Screen name="Faqs" component={Faqs} />
<Stack.Screen
options={{ headerShown: false }}
name="Notes"
component={Notes}
/>
<Stack.Screen
options={{ headerShown: false }}
name="AddNote"
component={AddNote}
/>
</Stack.Group>
) : (
<Stack.Screen
name="Land"
component={Land}
options={{ headerShown: false }}
/>
)}
</Stack.Navigator>
);
};
export default StackNavigator;