-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
RightModalNavigator.js
134 lines (128 loc) · 5.74 KB
/
RightModalNavigator.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import {createStackNavigator} from '@react-navigation/stack';
import PropTypes from 'prop-types';
import React from 'react';
import {View} from 'react-native';
import NoDropZone from '@components/DragAndDrop/NoDropZone';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators';
import RHPScreenOptions from '@libs/Navigation/AppNavigator/RHPScreenOptions';
import styles from '@styles/styles';
import Overlay from './Overlay';
const Stack = createStackNavigator();
const propTypes = {
/* Navigation functions provided by React Navigation */
navigation: PropTypes.shape({
goBack: PropTypes.func.isRequired,
}).isRequired,
};
function RightModalNavigator(props) {
const {isSmallScreenWidth} = useWindowDimensions();
return (
<NoDropZone>
{!isSmallScreenWidth && <Overlay onPress={props.navigation.goBack} />}
<View style={styles.RHPNavigatorContainer(isSmallScreenWidth)}>
<Stack.Navigator screenOptions={RHPScreenOptions}>
<Stack.Screen
name="Settings"
component={ModalStackNavigators.SettingsModalStackNavigator}
/>
<Stack.Screen
name="NewChat"
component={ModalStackNavigators.NewChatModalStackNavigator}
/>
<Stack.Screen
name="Search"
component={ModalStackNavigators.SearchModalStackNavigator}
options={{
// Disable animation for this screen because it causes an animation glitch when using shortcuts
animationEnabled: false,
}}
/>
<Stack.Screen
name="Details"
component={ModalStackNavigators.DetailsModalStackNavigator}
/>
<Stack.Screen
name="Profile"
component={ModalStackNavigators.ProfileModalStackNavigator}
/>
<Stack.Screen
name="Report_Details"
component={ModalStackNavigators.ReportDetailsModalStackNavigator}
/>
<Stack.Screen
name="Report_Settings"
component={ModalStackNavigators.ReportSettingsModalStackNavigator}
/>
<Stack.Screen
name="Report_WelcomeMessage"
component={ModalStackNavigators.ReportWelcomeMessageModalStackNavigator}
/>
<Stack.Screen
name="Participants"
component={ModalStackNavigators.ReportParticipantsModalStackNavigator}
/>
<Stack.Screen
name="RoomMembers"
component={ModalStackNavigators.RoomMembersModalStackNavigator}
/>
<Stack.Screen
name="RoomInvite"
component={ModalStackNavigators.RoomInviteModalStackNavigator}
/>
<Stack.Screen
name="MoneyRequest"
component={ModalStackNavigators.MoneyRequestModalStackNavigator}
/>
<Stack.Screen
name="NewTask"
component={ModalStackNavigators.NewTaskModalStackNavigator}
/>
<Stack.Screen
name="TeachersUnite"
component={ModalStackNavigators.NewTeachersUniteNavigator}
/>
<Stack.Screen
name="Task_Details"
component={ModalStackNavigators.TaskModalStackNavigator}
/>
<Stack.Screen
name="EnablePayments"
component={ModalStackNavigators.EnablePaymentsStackNavigator}
/>
<Stack.Screen
name="SplitDetails"
component={ModalStackNavigators.SplitDetailsModalStackNavigator}
/>
<Stack.Screen
name="AddPersonalBankAccount"
component={ModalStackNavigators.AddPersonalBankAccountModalStackNavigator}
/>
<Stack.Screen
name="Wallet_Statement"
component={ModalStackNavigators.WalletStatementStackNavigator}
/>
<Stack.Screen
name="Flag_Comment"
component={ModalStackNavigators.FlagCommentStackNavigator}
/>
<Stack.Screen
name="EditRequest"
component={ModalStackNavigators.EditRequestStackNavigator}
/>
<Stack.Screen
name="SignIn"
component={ModalStackNavigators.SignInModalStackNavigator}
/>
<Stack.Screen
name="Private_Notes"
component={ModalStackNavigators.PrivateNotesModalStackNavigator}
/>
</Stack.Navigator>
</View>
</NoDropZone>
);
}
RightModalNavigator.propTypes = propTypes;
RightModalNavigator.displayName = 'RightModalNavigator';
export default RightModalNavigator;