create-gufran-expo-app 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/template/src/navigation/AuthStack.tsx +6 -25
- package/template/src/navigation/MainStack.tsx +0 -148
- package/template/src/navigation/RootNavigator.tsx +4 -26
- package/template/src/navigation/index.ts +0 -1
- package/template/src/navigation/navigationRef.ts +1 -1
- package/template/src/screens/HomeScreen.tsx +3 -215
- package/template/src/screens/auth/LoginScreen.tsx +13 -13
- package/template/src/screens/auth/index.ts +1 -6
- package/template/src/screens/index.ts +0 -35
- package/template/src/services/api.ts +5 -5
- package/template/src/services/authService.ts +3 -299
- package/template/src/services/mainServices.ts +19 -1914
- package/template/src/types/navigation.ts +5 -155
- package/template/src/utils/index.ts +5 -8
- package/template/src/navigation/MiddleStack.tsx +0 -35
- package/template/src/screens/auth/AddMamber.tsx +0 -428
- package/template/src/screens/auth/ForgotPasswordScreen.tsx +0 -176
- package/template/src/screens/auth/OTPVerifyScreen.tsx +0 -359
- package/template/src/screens/auth/RegisterScreen.tsx +0 -430
- package/template/src/screens/auth/SuccessScreen.tsx +0 -201
- package/template/src/screens/chat/ChatScreen.tsx +0 -1819
- package/template/src/screens/chat/ChatThreadsScreen.tsx +0 -360
- package/template/src/screens/chat/ReportMessageScreen.tsx +0 -238
- package/template/src/screens/clubs/Announcements.tsx +0 -426
- package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +0 -568
- package/template/src/screens/clubs/ClubDeteils.tsx +0 -497
- package/template/src/screens/clubs/JoinClub.tsx +0 -841
- package/template/src/screens/events/EventScreen.tsx +0 -460
- package/template/src/screens/raffles/MyReferralMembersScreen.tsx +0 -758
- package/template/src/screens/raffles/RaffleDetailsScreen.tsx +0 -762
- package/template/src/screens/raffles/RafflesScreen.tsx +0 -495
- package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +0 -390
- package/template/src/screens/teams/JoinTeamScreen.tsx +0 -464
- package/template/src/screens/teams/MyTeamDetailsScreen.tsx +0 -979
- package/template/src/screens/teams/MyTeamScreen.tsx +0 -568
- package/template/src/screens/teams/PendingRequestsScreen.tsx +0 -426
- package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +0 -631
- package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +0 -1049
- package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +0 -608
- package/template/src/utils/ClubSearchManager.ts +0 -222
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
FlatList,
|
|
7
|
-
StatusBar,
|
|
8
|
-
Platform,
|
|
9
|
-
TouchableOpacity,
|
|
10
|
-
Image,
|
|
11
|
-
RefreshControl,
|
|
12
|
-
Keyboard,
|
|
13
|
-
} from "react-native";
|
|
14
|
-
import moment from "moment";
|
|
15
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
16
|
-
import { useFocusEffect } from "@react-navigation/native";
|
|
17
|
-
import { useTeamThreads, ChatThread } from "@services/mainServices";
|
|
18
|
-
import { ChatThreadsScreenProps } from "@navigation";
|
|
19
|
-
import { moderateScale } from "@utils/scaling";
|
|
20
|
-
import { Fonts } from "@constants/Fonts";
|
|
21
|
-
import { theme } from "@constants";
|
|
22
|
-
import SVG from "@assets/icons";
|
|
23
|
-
|
|
24
|
-
export const ChatThreadsScreen: React.FC<ChatThreadsScreenProps> = ({
|
|
25
|
-
navigation,
|
|
26
|
-
route,
|
|
27
|
-
}) => {
|
|
28
|
-
const { team }: any = route?.params ?? {};
|
|
29
|
-
const teamId = team?.teamId;
|
|
30
|
-
const memberId = team?.memberId;
|
|
31
|
-
const clubImage = team?.teamProfileImage;
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
data: threadsResponse,
|
|
35
|
-
isLoading,
|
|
36
|
-
isError,
|
|
37
|
-
error,
|
|
38
|
-
refetch,
|
|
39
|
-
} = useTeamThreads(teamId, memberId);
|
|
40
|
-
|
|
41
|
-
// Get threads data from response
|
|
42
|
-
const threads = threadsResponse?.data?.data || [];
|
|
43
|
-
|
|
44
|
-
useFocusEffect(useCallback(() => {
|
|
45
|
-
refetch();
|
|
46
|
-
}, [refetch]));
|
|
47
|
-
|
|
48
|
-
// Refresh data
|
|
49
|
-
const onRefresh = useCallback(() => {
|
|
50
|
-
refetch();
|
|
51
|
-
}, [refetch]);
|
|
52
|
-
|
|
53
|
-
const handleThreadPress = (item: any) => {
|
|
54
|
-
|
|
55
|
-
navigation.navigate("ChatScreen", {
|
|
56
|
-
itemDetails: item,
|
|
57
|
-
memberId: memberId,
|
|
58
|
-
teamId: teamId,
|
|
59
|
-
team: team,
|
|
60
|
-
userType: "teams"
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const renderThreadCard = ({ item }: { item: ChatThread }) => {
|
|
67
|
-
return (
|
|
68
|
-
<TouchableOpacity
|
|
69
|
-
style={styles.threadCard}
|
|
70
|
-
onPress={() => handleThreadPress(item)}
|
|
71
|
-
>
|
|
72
|
-
<View style={styles.threadInfo}>
|
|
73
|
-
<View style={styles.threadHeader}>
|
|
74
|
-
<Text style={styles.threadName} numberOfLines={1}>
|
|
75
|
-
{item?.threadName}
|
|
76
|
-
</Text>
|
|
77
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: theme.spacing.sm }}>
|
|
78
|
-
{item?.isMute && (
|
|
79
|
-
<SVG.mute width={moderateScale(18)} height={moderateScale(18)} />
|
|
80
|
-
)}
|
|
81
|
-
{item?.unreadMessageCount > 0 && (
|
|
82
|
-
<View style={styles.notificationBadge}>
|
|
83
|
-
<Text style={styles.notificationText}>{item?.unreadMessageCount}</Text>
|
|
84
|
-
</View>
|
|
85
|
-
)}
|
|
86
|
-
</View>
|
|
87
|
-
</View>
|
|
88
|
-
|
|
89
|
-
{item?.lastMessageText == "Attachment_Image" ? (
|
|
90
|
-
<Text style={styles.lastMessage} numberOfLines={1}>
|
|
91
|
-
Attachment Image
|
|
92
|
-
</Text>
|
|
93
|
-
) : (
|
|
94
|
-
<Text style={styles.lastMessage} numberOfLines={1}>
|
|
95
|
-
{item?.lastMessageText || 'No messages yet'}
|
|
96
|
-
</Text>
|
|
97
|
-
)}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{item?.lastMessageSentAt && (
|
|
101
|
-
<View>
|
|
102
|
-
<Text style={styles.lastMessageTime}>{moment(new Date(item?.lastMessageSentAt + "Z")).format('DD/MM/YYYY, hh:mm A')}</Text>
|
|
103
|
-
</View>
|
|
104
|
-
)}
|
|
105
|
-
</View>
|
|
106
|
-
</TouchableOpacity>
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const renderEmptyComponent = () => {
|
|
111
|
-
if (isLoading) {
|
|
112
|
-
return (
|
|
113
|
-
<View style={styles.loadingContainer}>
|
|
114
|
-
<Text style={styles.loadingText}>Loading chat threads...</Text>
|
|
115
|
-
</View>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return (
|
|
120
|
-
<View style={styles.emptyContainer}>
|
|
121
|
-
<Text style={styles.emptyText}>No chat threads available</Text>
|
|
122
|
-
<Text style={styles.emptySubText}>Start a conversation to see threads here</Text>
|
|
123
|
-
</View>
|
|
124
|
-
);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const handleScroll = useCallback(() => {
|
|
128
|
-
Keyboard.dismiss();
|
|
129
|
-
}, []);
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<SafeAreaView style={styles.container}>
|
|
133
|
-
<StatusBar backgroundColor={theme.colors.blue} barStyle="light-content" />
|
|
134
|
-
{Platform.OS === "android" && <View style={styles.statusBarBackground} />}
|
|
135
|
-
|
|
136
|
-
<View style={styles.header}>
|
|
137
|
-
<View style={styles.headerTopRow}>
|
|
138
|
-
<TouchableOpacity onPress={() => navigation.goBack()}>
|
|
139
|
-
<SVG.arrowLeft_white
|
|
140
|
-
width={moderateScale(25)}
|
|
141
|
-
height={moderateScale(25)}
|
|
142
|
-
/>
|
|
143
|
-
</TouchableOpacity>
|
|
144
|
-
<View style={{ flexDirection: "row", flex: 1 }}>
|
|
145
|
-
<View style={styles.userConSty}>
|
|
146
|
-
{!!clubImage ? (
|
|
147
|
-
<Image
|
|
148
|
-
source={{ uri: clubImage }}
|
|
149
|
-
style={styles.userDetailsSty}
|
|
150
|
-
resizeMode='cover'
|
|
151
|
-
/>
|
|
152
|
-
) : (
|
|
153
|
-
<View style={styles.placeholderLogoHeader}>
|
|
154
|
-
<SVG.UsersIcon
|
|
155
|
-
width={moderateScale(20)}
|
|
156
|
-
height={moderateScale(20)}
|
|
157
|
-
/>
|
|
158
|
-
</View>
|
|
159
|
-
)}
|
|
160
|
-
</View>
|
|
161
|
-
<View style={styles.clubInfoContainer}>
|
|
162
|
-
<Text style={styles.userNameSty}>
|
|
163
|
-
{team?.teamName || "Unknown Member"}
|
|
164
|
-
</Text>
|
|
165
|
-
<Text style={styles.totalMembersSty}>
|
|
166
|
-
{team?.totalMembers || 0}{" "}
|
|
167
|
-
{(team?.totalMembers || 0) === 1 ? "member" : "members"}
|
|
168
|
-
</Text>
|
|
169
|
-
</View>
|
|
170
|
-
</View>
|
|
171
|
-
</View>
|
|
172
|
-
|
|
173
|
-
</View>
|
|
174
|
-
<View style={styles.contentList}>
|
|
175
|
-
<Text style={styles.sectionHeading}>Chat Threads</Text>
|
|
176
|
-
<FlatList
|
|
177
|
-
data={threads}
|
|
178
|
-
renderItem={renderThreadCard}
|
|
179
|
-
keyExtractor={(item) => item?.id?.toString() || Math.random().toString()}
|
|
180
|
-
style={styles.clubsList}
|
|
181
|
-
showsVerticalScrollIndicator={false}
|
|
182
|
-
contentContainerStyle={styles.flatListContent}
|
|
183
|
-
removeClippedSubviews={false}
|
|
184
|
-
initialNumToRender={10}
|
|
185
|
-
ListEmptyComponent={renderEmptyComponent}
|
|
186
|
-
onScroll={handleScroll}
|
|
187
|
-
scrollEventThrottle={16}
|
|
188
|
-
refreshControl={
|
|
189
|
-
<RefreshControl
|
|
190
|
-
refreshing={isLoading}
|
|
191
|
-
onRefresh={onRefresh}
|
|
192
|
-
colors={[theme.colors.primary]}
|
|
193
|
-
tintColor={theme.colors.primary}
|
|
194
|
-
/>
|
|
195
|
-
}
|
|
196
|
-
/>
|
|
197
|
-
</View>
|
|
198
|
-
</SafeAreaView>
|
|
199
|
-
);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
const styles = StyleSheet.create({
|
|
203
|
-
container: {
|
|
204
|
-
flex: 1,
|
|
205
|
-
backgroundColor: theme.colors.blue,
|
|
206
|
-
},
|
|
207
|
-
statusBarBackground: {
|
|
208
|
-
position: "absolute",
|
|
209
|
-
top: 0,
|
|
210
|
-
left: 0,
|
|
211
|
-
right: 0,
|
|
212
|
-
height: Platform.OS === "ios" ? 44 : 0,
|
|
213
|
-
backgroundColor: theme.colors.blue,
|
|
214
|
-
zIndex: 1000,
|
|
215
|
-
},
|
|
216
|
-
header: {
|
|
217
|
-
backgroundColor: theme.colors.blue,
|
|
218
|
-
paddingTop: Platform.OS === "android" ? theme.spacing.lg : theme.spacing.xs,
|
|
219
|
-
paddingBottom: theme.spacing.xl,
|
|
220
|
-
},
|
|
221
|
-
headerTopRow: {
|
|
222
|
-
flexDirection: "row",
|
|
223
|
-
paddingHorizontal: theme.spacing.lg,
|
|
224
|
-
paddingBottom: theme.spacing.sm,
|
|
225
|
-
},
|
|
226
|
-
clubInfoContainer: {
|
|
227
|
-
marginLeft: moderateScale(4),
|
|
228
|
-
justifyContent: 'center',
|
|
229
|
-
},
|
|
230
|
-
userNameSty: {
|
|
231
|
-
color: theme.colors.white,
|
|
232
|
-
fontFamily: Fonts.outfitRegular,
|
|
233
|
-
fontSize: moderateScale(16),
|
|
234
|
-
},
|
|
235
|
-
totalMembersSty: {
|
|
236
|
-
fontFamily: Fonts.outfitRegular,
|
|
237
|
-
fontSize: moderateScale(11),
|
|
238
|
-
color: theme.colors.appleGreen,
|
|
239
|
-
},
|
|
240
|
-
userDetailsSty: {
|
|
241
|
-
width: moderateScale(36),
|
|
242
|
-
height: moderateScale(36),
|
|
243
|
-
borderRadius: moderateScale(18),
|
|
244
|
-
},
|
|
245
|
-
userConSty: {
|
|
246
|
-
marginLeft: moderateScale(12),
|
|
247
|
-
marginRight: theme.spacing.xs,
|
|
248
|
-
width: moderateScale(36),
|
|
249
|
-
height: moderateScale(36),
|
|
250
|
-
borderRadius: moderateScale(20),
|
|
251
|
-
borderWidth: 1.5,
|
|
252
|
-
borderColor: theme.colors.imageBorder,
|
|
253
|
-
backgroundColor: theme.colors.imageBorder,
|
|
254
|
-
alignItems: "center",
|
|
255
|
-
justifyContent: "center",
|
|
256
|
-
},
|
|
257
|
-
placeholderLogoHeader: {
|
|
258
|
-
width: moderateScale(20),
|
|
259
|
-
height: moderateScale(20),
|
|
260
|
-
borderRadius: moderateScale(10),
|
|
261
|
-
alignItems: "center",
|
|
262
|
-
justifyContent: "center",
|
|
263
|
-
},
|
|
264
|
-
sectionHeading: {
|
|
265
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
266
|
-
fontSize: moderateScale(18),
|
|
267
|
-
color: theme.colors.black,
|
|
268
|
-
marginBottom: theme.spacing.md,
|
|
269
|
-
},
|
|
270
|
-
emptyContainer: {
|
|
271
|
-
alignItems: "center",
|
|
272
|
-
paddingVertical: theme.spacing.xl,
|
|
273
|
-
},
|
|
274
|
-
emptyText: {
|
|
275
|
-
fontFamily: Fonts.outfitRegular,
|
|
276
|
-
fontSize: moderateScale(14),
|
|
277
|
-
color: theme.colors.textSecondary,
|
|
278
|
-
},
|
|
279
|
-
loadingContainer: {
|
|
280
|
-
alignItems: "center",
|
|
281
|
-
paddingVertical: theme.spacing.xl,
|
|
282
|
-
},
|
|
283
|
-
loadingText: {
|
|
284
|
-
fontFamily: Fonts.outfitRegular,
|
|
285
|
-
fontSize: moderateScale(14),
|
|
286
|
-
color: theme.colors.textSecondary,
|
|
287
|
-
marginTop: theme.spacing.md,
|
|
288
|
-
},
|
|
289
|
-
clubsList: {
|
|
290
|
-
flex: 1,
|
|
291
|
-
},
|
|
292
|
-
flatListContent: {
|
|
293
|
-
paddingBottom: theme.spacing.xl,
|
|
294
|
-
},
|
|
295
|
-
contentList: {
|
|
296
|
-
flex: 1,
|
|
297
|
-
backgroundColor: theme.colors.background,
|
|
298
|
-
borderTopLeftRadius: moderateScale(30),
|
|
299
|
-
borderTopRightRadius: moderateScale(30),
|
|
300
|
-
marginTop: -theme.spacing.xl,
|
|
301
|
-
paddingHorizontal: theme.spacing.lg,
|
|
302
|
-
paddingTop: theme.spacing.lg,
|
|
303
|
-
},
|
|
304
|
-
threadCard: {
|
|
305
|
-
flexDirection: 'row',
|
|
306
|
-
padding: theme.spacing.md,
|
|
307
|
-
backgroundColor: theme.colors.lightLavenderGray,
|
|
308
|
-
marginBottom: theme.spacing.sm,
|
|
309
|
-
borderRadius: theme.borderRadius.xl,
|
|
310
|
-
|
|
311
|
-
},
|
|
312
|
-
threadInfo: {
|
|
313
|
-
flex: 1,
|
|
314
|
-
justifyContent: 'center',
|
|
315
|
-
},
|
|
316
|
-
threadHeader: {
|
|
317
|
-
flexDirection: 'row',
|
|
318
|
-
justifyContent: 'space-between',
|
|
319
|
-
alignItems: 'center',
|
|
320
|
-
marginBottom: theme.spacing.xs,
|
|
321
|
-
},
|
|
322
|
-
threadName: {
|
|
323
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
324
|
-
fontSize: moderateScale(16),
|
|
325
|
-
color: theme.colors.black,
|
|
326
|
-
flex: 1,
|
|
327
|
-
},
|
|
328
|
-
lastMessage: {
|
|
329
|
-
fontFamily: Fonts.outfitRegular,
|
|
330
|
-
fontSize: moderateScale(14),
|
|
331
|
-
color: theme.colors.textSecondary,
|
|
332
|
-
marginBottom: theme.spacing.xs,
|
|
333
|
-
},
|
|
334
|
-
lastMessageTime: {
|
|
335
|
-
fontFamily: Fonts.outfitRegular,
|
|
336
|
-
fontSize: moderateScale(12),
|
|
337
|
-
color: theme.colors.black,
|
|
338
|
-
alignSelf: 'flex-end',
|
|
339
|
-
},
|
|
340
|
-
emptySubText: {
|
|
341
|
-
fontFamily: Fonts.outfitRegular,
|
|
342
|
-
fontSize: moderateScale(12),
|
|
343
|
-
color: theme.colors.textSecondary,
|
|
344
|
-
marginTop: theme.spacing.xs,
|
|
345
|
-
textAlign: 'center',
|
|
346
|
-
},
|
|
347
|
-
notificationBadge: {
|
|
348
|
-
backgroundColor: theme.colors.error,
|
|
349
|
-
borderRadius: moderateScale(10),
|
|
350
|
-
minWidth: moderateScale(25),
|
|
351
|
-
height: moderateScale(20),
|
|
352
|
-
justifyContent: 'center',
|
|
353
|
-
alignItems: 'center'
|
|
354
|
-
},
|
|
355
|
-
notificationText: {
|
|
356
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
357
|
-
fontSize: moderateScale(12),
|
|
358
|
-
color: theme.colors.white,
|
|
359
|
-
},
|
|
360
|
-
});
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from "react";
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
TouchableOpacity,
|
|
7
|
-
KeyboardAvoidingView,
|
|
8
|
-
Platform,
|
|
9
|
-
ScrollView,
|
|
10
|
-
TextInput,
|
|
11
|
-
Alert,
|
|
12
|
-
StatusBar
|
|
13
|
-
} from "react-native";
|
|
14
|
-
import { theme } from "../../constants";
|
|
15
|
-
import { moderateScale } from "../../utils/scaling";
|
|
16
|
-
import { Fonts } from "../../constants/Fonts";
|
|
17
|
-
|
|
18
|
-
interface ReportMessageScreenProps {
|
|
19
|
-
navigation: any;
|
|
20
|
-
route: {
|
|
21
|
-
params: {
|
|
22
|
-
message: any;
|
|
23
|
-
memberId: string;
|
|
24
|
-
onReportSubmit?: (reason: string, message: any) => void;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const ReportMessageScreen: React.FC<ReportMessageScreenProps> = ({ navigation, route }) => {
|
|
30
|
-
const { message, memberId, onReportSubmit } = route.params;
|
|
31
|
-
const [reportReason, setReportReason] = useState('');
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
// Set navigation options
|
|
35
|
-
navigation.setOptions({
|
|
36
|
-
presentation: 'transparentModal',
|
|
37
|
-
headerShown: false,
|
|
38
|
-
});
|
|
39
|
-
}, [navigation]);
|
|
40
|
-
|
|
41
|
-
const handleReportSubmit = () => {
|
|
42
|
-
if (!reportReason.trim()) {
|
|
43
|
-
Alert.alert("Error", "Please provide a reason for reporting this message.");
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Call the callback function if provided
|
|
48
|
-
if (onReportSubmit) {
|
|
49
|
-
onReportSubmit(reportReason, message);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Log the report
|
|
53
|
-
console.log("Reporting message:", {
|
|
54
|
-
messageId: message?._id,
|
|
55
|
-
reason: reportReason,
|
|
56
|
-
reportedBy: memberId
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
Alert.alert(
|
|
60
|
-
"Report Submitted",
|
|
61
|
-
"Your report has been submitted successfully. We will review it shortly.",
|
|
62
|
-
[
|
|
63
|
-
{
|
|
64
|
-
text: "OK",
|
|
65
|
-
onPress: () => navigation.goBack()
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const handleClose = () => {
|
|
72
|
-
navigation.goBack();
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<View style={styles.container}>
|
|
77
|
-
<StatusBar barStyle="dark-content" backgroundColor="transparent" translucent />
|
|
78
|
-
<KeyboardAvoidingView
|
|
79
|
-
behavior={Platform.OS === "ios" ? "padding" : "height"}
|
|
80
|
-
style={styles.keyboardAvoidingView}
|
|
81
|
-
>
|
|
82
|
-
<TouchableOpacity
|
|
83
|
-
style={styles.overlay}
|
|
84
|
-
activeOpacity={1}
|
|
85
|
-
onPress={handleClose}
|
|
86
|
-
>
|
|
87
|
-
<TouchableOpacity
|
|
88
|
-
activeOpacity={1}
|
|
89
|
-
onPress={(e) => e.stopPropagation()}
|
|
90
|
-
style={styles.modalContent}
|
|
91
|
-
>
|
|
92
|
-
<View style={styles.modalHeader}>
|
|
93
|
-
<Text style={styles.modalTitle}>Report Message</Text>
|
|
94
|
-
<TouchableOpacity onPress={handleClose}>
|
|
95
|
-
<Text style={styles.closeButton}>✕</Text>
|
|
96
|
-
</TouchableOpacity>
|
|
97
|
-
</View>
|
|
98
|
-
|
|
99
|
-
<ScrollView
|
|
100
|
-
style={styles.modalBody}
|
|
101
|
-
showsVerticalScrollIndicator={false}
|
|
102
|
-
keyboardShouldPersistTaps="handled"
|
|
103
|
-
>
|
|
104
|
-
<Text style={styles.modalSubtitle}>
|
|
105
|
-
Why are you reporting this message?
|
|
106
|
-
</Text>
|
|
107
|
-
|
|
108
|
-
<TextInput
|
|
109
|
-
style={styles.reportInput}
|
|
110
|
-
placeholder="Please describe the issue..."
|
|
111
|
-
placeholderTextColor="#999"
|
|
112
|
-
multiline
|
|
113
|
-
numberOfLines={6}
|
|
114
|
-
value={reportReason}
|
|
115
|
-
onChangeText={setReportReason}
|
|
116
|
-
textAlignVertical="top"
|
|
117
|
-
/>
|
|
118
|
-
</ScrollView>
|
|
119
|
-
|
|
120
|
-
<View style={styles.modalFooter}>
|
|
121
|
-
<TouchableOpacity
|
|
122
|
-
style={styles.cancelButton}
|
|
123
|
-
onPress={handleClose}
|
|
124
|
-
>
|
|
125
|
-
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
126
|
-
</TouchableOpacity>
|
|
127
|
-
<TouchableOpacity
|
|
128
|
-
style={styles.submitButton}
|
|
129
|
-
onPress={handleReportSubmit}
|
|
130
|
-
>
|
|
131
|
-
<Text style={styles.submitButtonText}>Submit Report</Text>
|
|
132
|
-
</TouchableOpacity>
|
|
133
|
-
</View>
|
|
134
|
-
</TouchableOpacity>
|
|
135
|
-
</TouchableOpacity>
|
|
136
|
-
</KeyboardAvoidingView>
|
|
137
|
-
</View>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const styles = StyleSheet.create({
|
|
142
|
-
container: {
|
|
143
|
-
flex: 1,
|
|
144
|
-
backgroundColor: 'transparent',
|
|
145
|
-
},
|
|
146
|
-
keyboardAvoidingView: {
|
|
147
|
-
flex: 1,
|
|
148
|
-
},
|
|
149
|
-
overlay: {
|
|
150
|
-
flex: 1,
|
|
151
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
152
|
-
justifyContent: 'center',
|
|
153
|
-
alignItems: 'center',
|
|
154
|
-
},
|
|
155
|
-
modalContent: {
|
|
156
|
-
backgroundColor: theme.colors.white,
|
|
157
|
-
borderRadius: moderateScale(16),
|
|
158
|
-
width: '90%',
|
|
159
|
-
maxHeight: '80%',
|
|
160
|
-
overflow: 'hidden',
|
|
161
|
-
borderWidth: 1,
|
|
162
|
-
},
|
|
163
|
-
modalHeader: {
|
|
164
|
-
flexDirection: 'row',
|
|
165
|
-
justifyContent: 'space-between',
|
|
166
|
-
alignItems: 'center',
|
|
167
|
-
padding: moderateScale(16),
|
|
168
|
-
borderBottomWidth: 1,
|
|
169
|
-
borderBottomColor: theme.colors.border,
|
|
170
|
-
},
|
|
171
|
-
modalTitle: {
|
|
172
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
173
|
-
fontSize: moderateScale(18),
|
|
174
|
-
color: theme.colors.black,
|
|
175
|
-
},
|
|
176
|
-
closeButton: {
|
|
177
|
-
fontSize: moderateScale(24),
|
|
178
|
-
color: theme.colors.textSecondary,
|
|
179
|
-
fontWeight: '300',
|
|
180
|
-
},
|
|
181
|
-
modalBody: {
|
|
182
|
-
padding: moderateScale(16),
|
|
183
|
-
flexGrow: 1,
|
|
184
|
-
},
|
|
185
|
-
modalSubtitle: {
|
|
186
|
-
fontFamily: Fonts.outfitRegular,
|
|
187
|
-
fontSize: moderateScale(14),
|
|
188
|
-
color: theme.colors.textSecondary,
|
|
189
|
-
marginBottom: moderateScale(12),
|
|
190
|
-
},
|
|
191
|
-
reportInput: {
|
|
192
|
-
fontFamily: Fonts.outfitRegular,
|
|
193
|
-
fontSize: moderateScale(14),
|
|
194
|
-
color: theme.colors.black,
|
|
195
|
-
backgroundColor: theme.colors.lightLavenderGray,
|
|
196
|
-
borderRadius: moderateScale(8),
|
|
197
|
-
padding: moderateScale(12),
|
|
198
|
-
minHeight: moderateScale(120),
|
|
199
|
-
borderWidth: 1,
|
|
200
|
-
borderColor: theme.colors.border,
|
|
201
|
-
},
|
|
202
|
-
modalFooter: {
|
|
203
|
-
flexDirection: 'row',
|
|
204
|
-
borderTopWidth: 1,
|
|
205
|
-
borderTopColor: theme.colors.border,
|
|
206
|
-
padding: moderateScale(16),
|
|
207
|
-
},
|
|
208
|
-
cancelButton: {
|
|
209
|
-
flex: 1,
|
|
210
|
-
paddingVertical: moderateScale(12),
|
|
211
|
-
alignItems: 'center',
|
|
212
|
-
justifyContent: 'center',
|
|
213
|
-
marginRight: moderateScale(8),
|
|
214
|
-
borderRadius: moderateScale(8),
|
|
215
|
-
borderWidth: 1,
|
|
216
|
-
borderColor: theme.colors.border,
|
|
217
|
-
},
|
|
218
|
-
cancelButtonText: {
|
|
219
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
220
|
-
fontSize: moderateScale(16),
|
|
221
|
-
color: theme.colors.black,
|
|
222
|
-
},
|
|
223
|
-
submitButton: {
|
|
224
|
-
flex: 1,
|
|
225
|
-
paddingVertical: moderateScale(12),
|
|
226
|
-
alignItems: 'center',
|
|
227
|
-
justifyContent: 'center',
|
|
228
|
-
backgroundColor: theme.colors.blue,
|
|
229
|
-
borderRadius: moderateScale(8),
|
|
230
|
-
marginLeft: moderateScale(8),
|
|
231
|
-
},
|
|
232
|
-
submitButtonText: {
|
|
233
|
-
fontFamily: Fonts.outfitSemiBold,
|
|
234
|
-
fontSize: moderateScale(16),
|
|
235
|
-
color: theme.colors.white,
|
|
236
|
-
},
|
|
237
|
-
});
|
|
238
|
-
|