forked from Planny-Patrat-Blueocean/Planny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RootStack.tsx
112 lines (95 loc) · 3.08 KB
/
RootStack.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
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
import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import HomeScreen from './src/screens/Home';
import CreateHouseScreen from './src/screens/CreateHouse';
import JoinHouseScreen from './src/screens/JoinHouse';
import AddNewPlantScreen from './src/screens/AddNewPlant';
import PlantProfileScreen from './src/screens/PlantProfile';
import AssignPlantCaretakerScreen from './src/screens/AssignPlantCaretaker';
import MyPlantsScreen from './src/screens/MyPlants';
import HouseGroupScreen from './src/screens/HouseGroup';
import MessageGroupList from './src/components/messages/MessageGroupList'
import Chatroom from './src/components/messages/chatroom'
import MessagesScreen from './src/screens/Messages'
export type RootStackParamList = {
// Login: undefined;
Home: undefined;
CreateHouse: undefined;
JoinHouse: undefined;
MyPlants: undefined;
Messages: undefined;
ChatRoom: undefined;
HouseGroup: { screen: string; p: object } | undefined;
'Add New Plant': { houseId: number };
'Plant Profile': { plantId: number, houseId: number | null};
'Assign Caretaker': { plantId: number, houseId: number, currentCaretakerIds: string[]};
// SignUp: undefined;
};
export type RootTabParamList = {
Home: undefined;
Messages: undefined;
Community: undefined;
Profile: undefined;
};
const Stack = createNativeStackNavigator<RootStackParamList>();
export default function RootStack() {
return (
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={HomeScreen}
options={{headerShown: false}}
/>
<Stack.Screen
name="CreateHouse"
component={CreateHouseScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="JoinHouse"
component={JoinHouseScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="Add New Plant"
component={AddNewPlantScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="Plant Profile"
component={PlantProfileScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="Assign Caretaker"
component={AssignPlantCaretakerScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="MyPlants"
component={MyPlantsScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="HouseGroup"
component={HouseGroupScreen}
options={{ headerTitle: '' }}
/>
<Stack.Screen
name="Messages"
component={MessagesScreen}
options={{ headerTitle: '', headerLeft: null, }}
/>
<Stack.Screen
name="Your Homes"
component={MessageGroupList}
options={{ headerTitle: '', headerLeft: null, }}
/>
<Stack.Screen
name="ChatRoom"
component={Chatroom}
options={{ headerTitle: '', headerLeft: null, }}
/>
</Stack.Navigator>
);
}