create-gufran-expo-app 2.0.3 → 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.
Files changed (42) hide show
  1. package/README.md +1 -2
  2. package/package.json +3 -3
  3. package/template/src/navigation/AuthStack.tsx +6 -25
  4. package/template/src/navigation/MainStack.tsx +0 -148
  5. package/template/src/navigation/RootNavigator.tsx +4 -26
  6. package/template/src/navigation/index.ts +0 -1
  7. package/template/src/navigation/navigationRef.ts +1 -1
  8. package/template/src/screens/HomeScreen.tsx +3 -215
  9. package/template/src/screens/auth/LoginScreen.tsx +13 -13
  10. package/template/src/screens/auth/index.ts +1 -6
  11. package/template/src/screens/index.ts +0 -35
  12. package/template/src/services/api.ts +5 -5
  13. package/template/src/services/authService.ts +3 -299
  14. package/template/src/services/mainServices.ts +19 -1914
  15. package/template/src/types/navigation.ts +5 -155
  16. package/template/src/utils/index.ts +5 -8
  17. package/template/src/navigation/MiddleStack.tsx +0 -35
  18. package/template/src/screens/auth/AddMamber.tsx +0 -428
  19. package/template/src/screens/auth/ForgotPasswordScreen.tsx +0 -176
  20. package/template/src/screens/auth/OTPVerifyScreen.tsx +0 -359
  21. package/template/src/screens/auth/RegisterScreen.tsx +0 -430
  22. package/template/src/screens/auth/SuccessScreen.tsx +0 -201
  23. package/template/src/screens/chat/ChatScreen.tsx +0 -1819
  24. package/template/src/screens/chat/ChatThreadsScreen.tsx +0 -360
  25. package/template/src/screens/chat/ReportMessageScreen.tsx +0 -238
  26. package/template/src/screens/clubs/Announcements.tsx +0 -426
  27. package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +0 -568
  28. package/template/src/screens/clubs/ClubDeteils.tsx +0 -497
  29. package/template/src/screens/clubs/JoinClub.tsx +0 -841
  30. package/template/src/screens/events/EventScreen.tsx +0 -460
  31. package/template/src/screens/raffles/MyReferralMembersScreen.tsx +0 -758
  32. package/template/src/screens/raffles/RaffleDetailsScreen.tsx +0 -762
  33. package/template/src/screens/raffles/RafflesScreen.tsx +0 -495
  34. package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +0 -390
  35. package/template/src/screens/teams/JoinTeamScreen.tsx +0 -464
  36. package/template/src/screens/teams/MyTeamDetailsScreen.tsx +0 -979
  37. package/template/src/screens/teams/MyTeamScreen.tsx +0 -568
  38. package/template/src/screens/teams/PendingRequestsScreen.tsx +0 -426
  39. package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +0 -631
  40. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +0 -1049
  41. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +0 -608
  42. package/template/src/utils/ClubSearchManager.ts +0 -222
@@ -1,497 +0,0 @@
1
-
2
- import { View, Text, StyleSheet, StatusBar, Platform, TouchableOpacity, ScrollView, Image } from 'react-native';
3
- import { theme } from '../../constants';
4
- import { moderateScale } from '../../utils/scaling';
5
- import { Fonts } from '../../constants/Fonts';
6
- import SVG from '../../assets/icons';
7
- import { SafeAreaView } from 'react-native-safe-area-context';
8
- import { ClubDetailsScreenProps } from '../../types';
9
- import { useState } from 'react';
10
- import Images from '../../assets/images';
11
-
12
-
13
-
14
-
15
- export const ClubDetailsScreen: React.FC<ClubDetailsScreenProps> = ({ navigation, route }) => {
16
- const selectedClub = route.params;
17
- const [imageError, setImageError] = useState(false);
18
-
19
- // Helper function to create navigation data
20
- const createNavigationData = () => {
21
- const navigationData = {
22
- selectedClub: selectedClub,
23
- selectedMember: selectedClub?.selectedMember
24
- };
25
- return navigationData;
26
- };
27
-
28
- const featureCards: any[] = [
29
- {
30
- id: 'teams',
31
- title: 'Teams',
32
- description: 'Join club to start your club journey.',
33
- icon: <SVG.Teams width={moderateScale(40)} height={moderateScale(40)} />,
34
- backgroundColor: '#F9F1FF',
35
- notificationCount: 2,
36
- cardHeight: 'short',
37
- onPress: () => navigation.navigate('MyTeam', createNavigationData()),
38
- },
39
- {
40
- id: 'calendar',
41
- title: 'Calendar',
42
- description: 'Track training, games, and team events with filters and reminders.',
43
- icon: <SVG.Calendar width={moderateScale(40)} height={moderateScale(40)} />,
44
- backgroundColor: '#EBFBF5',
45
- notificationCount: 3,
46
- cardHeight: 'tall',
47
- onPress: () => {
48
- console.log('Calendar pressed', createNavigationData());
49
- // Future navigation: navigation.navigate('Calendar', createNavigationData())
50
- },
51
- },
52
- {
53
- id: 'raffles',
54
- title: 'Raffles',
55
- description: 'Support & Win: Buy Raffle Tickets in the App',
56
- icon: <SVG.Raffles width={moderateScale(40)} height={moderateScale(40)} />,
57
- backgroundColor: '#EAF7FF',
58
- notificationCount: 3,
59
- cardHeight: 'medium',
60
- onPress: () => {
61
- console.log('Raffles pressed', createNavigationData());
62
- navigation.navigate('Raffles', createNavigationData());
63
- },
64
- },
65
- {
66
- id: 'Announcements',
67
- title: 'Announcements',
68
- description: 'Connect, coordinate, and cheer on—right from your team group chat.',
69
- icon: <SVG.Chat width={moderateScale(40)} height={moderateScale(40)} />,
70
- backgroundColor: '#FFF3F3',
71
- notificationCount: 1,
72
- cardHeight: 'tall',
73
- onPress: () => {
74
- console.log('Chat pressed', createNavigationData());
75
- navigation.navigate('Announcements', createNavigationData())
76
- },
77
- },
78
- {
79
- id: 'shop',
80
- title: 'Shop',
81
- description: 'Shop Team Gear & Food & Drinks to Support the Club',
82
- icon: <SVG.Shop width={moderateScale(40)} height={moderateScale(40)} />,
83
- backgroundColor: '#F5F7FF',
84
- notificationCount: 3,
85
- cardHeight: 'medium',
86
- onPress: () => {
87
- console.log('Shop pressed', createNavigationData());
88
- // Future navigation: navigation.navigate('Shop', createNavigationData())
89
- },
90
- },
91
- {
92
- id: 'events',
93
- title: 'Events',
94
- description: 'Selling tickets to fundraisers, etc.',
95
- icon: <SVG.Events width={moderateScale(40)} height={moderateScale(40)} />,
96
- backgroundColor: '#FFF1DB',
97
- notificationCount: 3,
98
- cardHeight: 'short',
99
- onPress: () => {
100
- console.log('Events pressed', createNavigationData());
101
- navigation: navigation.navigate('EventScreen', createNavigationData())
102
- },
103
- },
104
- {
105
- id: 'volunteer',
106
- title: 'Volunteer Opportunities',
107
- description: 'Support the club with your time and talent.',
108
- icon: <SVG.Volunteer width={moderateScale(40)} height={moderateScale(40)} />,
109
- backgroundColor: '#EFF9FF',
110
- notificationCount: 3,
111
- cardHeight: 'medium',
112
- onPress: () => {
113
- console.log('Volunteer pressed', createNavigationData());
114
- navigation: navigation.navigate('VolunteerOpportunitiesScreen', createNavigationData())
115
- },
116
- },
117
- {
118
- id: 'membership',
119
- title: 'Membership',
120
- description: 'Unlock Elite Access to Exclusive Facilities & Events',
121
- icon: <SVG.Membership width={moderateScale(40)} height={moderateScale(40)} />,
122
- backgroundColor: '#F7E9FF',
123
- notificationCount: 3,
124
- cardHeight: 'medium',
125
- onPress: () => {
126
- console.log('Membership pressed', createNavigationData());
127
- // Future navigation: navigation.navigate('Membership', createNavigationData())
128
- },
129
- },
130
- ];
131
-
132
-
133
-
134
- const renderFeatureCard = (card: any) => (
135
- <TouchableOpacity
136
- key={card.id}
137
- style={[
138
- styles.featureCard,
139
- { backgroundColor: card.backgroundColor }
140
- ]}
141
- onPress={() => card?.onPress()}
142
- activeOpacity={0.8}
143
- >
144
- <View style={styles.cardHeader}>
145
- {card.icon}
146
- <View style={styles.notificationBadge}>
147
- <Text style={styles.notificationText}>{card.notificationCount}</Text>
148
- </View>
149
- </View>
150
- <Text style={styles.cardTitle}>{card.title}</Text>
151
- <Text style={styles.cardDescription}>{card.description}</Text>
152
- </TouchableOpacity>
153
- );
154
-
155
- return (
156
- <View style={styles.container}>
157
- <StatusBar
158
- barStyle="light-content"
159
- backgroundColor={theme.colors.blue}
160
- translucent={Platform.OS === 'android' ? true : false}
161
- />
162
- {Platform.OS === 'ios' && <View style={styles.statusBarBackground} />}
163
-
164
- <SafeAreaView style={styles.header}>
165
- <View style={styles.headerContent}>
166
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
167
- <TouchableOpacity onPress={() => navigation.goBack()}>
168
- <SVG.arrowLeft_white width={moderateScale(25)} height={moderateScale(25)} />
169
- </TouchableOpacity>
170
- <View style={{ flexDirection: 'row' }}>
171
- <View style={styles.userConSty}>
172
- {!!selectedClub?.selectedMember?.profileImage ? (
173
- <Image
174
- // onLoadEnd={() => setIsLoading(false)}
175
- // onLoad={() => setIsLoading(true)}
176
- // onLoadStart={() => setIsLoading(true)}
177
- source={{ uri: selectedClub.selectedMember.profileImage }} style={styles.userDetailsSty} />
178
- ) : (
179
- <View style={styles.placeholderLogoHeader}>
180
- <SVG.UsersIcon width={moderateScale(20)} height={moderateScale(20)} />
181
- </View>)}
182
- </View>
183
- <Text style={styles.userNameSty}>{selectedClub?.selectedMember?.name || 'Unknown Member'}</Text>
184
- </View>
185
- </View>
186
-
187
-
188
-
189
-
190
- <View style={styles.clubInfoContainer}>
191
- <View style={styles.clubLogoContainer}>
192
- <View style={styles.clubLogo}>
193
- {!!selectedClub?.clubImage && !imageError ? (
194
- <Image
195
- source={{ uri: selectedClub?.clubImage }} style={styles.clubLogo}
196
- onError={() => {
197
- setImageError(true);
198
- }}
199
- // onLoadEnd={() => setIsLoading(false)}
200
- // onLoad={() => setIsLoading(true)}
201
- // onLoadStart={() => setIsLoading(true)}
202
- />
203
- ) : (
204
- <View style={styles.placeholderLogo}>
205
- <Image source={Images.clubDefauldImage} style={styles.clubLogo} />
206
- </View>
207
- )}
208
- </View>
209
- </View>
210
-
211
- <View style={styles.clubDetails}>
212
- <Text style={styles.clubName} numberOfLines={1}>{selectedClub?.clubName || 'Club Name'}</Text>
213
-
214
- <View style={styles.memberInfoRow}>
215
- <View style={styles.memberCountContainer}>
216
- <SVG.profileAppleGreen width={moderateScale(16)} height={moderateScale(16)} />
217
- <Text style={styles.memberCount}>
218
- {selectedClub?.totalMembers || 0} {(selectedClub?.totalMembers || 0) === 1 ? 'member' : 'members'}
219
- </Text>
220
- </View>
221
- <Text style={styles.clubCode}>{selectedClub?.clubCode || 'N/A'}</Text>
222
- </View>
223
-
224
- <View style={styles.addressContainer}>
225
- <SVG.locationWhite width={moderateScale(16)} height={moderateScale(16)} />
226
- <Text numberOfLines={1} style={styles.clubAddress}>{selectedClub?.clubAddress || 'Address not available'}</Text>
227
- </View>
228
- </View>
229
- </View>
230
- </View>
231
- </SafeAreaView>
232
-
233
- <View style={styles.content}>
234
-
235
- <Text style={styles.mainTitle}>MY SPORT HUB</Text>
236
- <Text style={styles.subtitle}>
237
- Your all-in-one center for team updates, events, and performance tracking.
238
- </Text>
239
- <ScrollView
240
- style={styles.scrollContainer}
241
- showsVerticalScrollIndicator={false}
242
- contentContainerStyle={styles.scrollContent}
243
- >
244
- <View style={styles.cardsGrid}>
245
- {featureCards.map(renderFeatureCard)}
246
- </View>
247
- </ScrollView>
248
- </View>
249
- </View>
250
- );
251
- };
252
-
253
- const styles = StyleSheet.create({
254
- container: {
255
- flex: 1,
256
- backgroundColor: theme.colors.blue,
257
- },
258
- statusBarBackground: {
259
- position: 'absolute',
260
- top: 0,
261
- left: 0,
262
- right: 0,
263
- height: Platform.OS === 'ios' ? 44 : 0,
264
- backgroundColor: theme.colors.blue,
265
- zIndex: 1000,
266
- },
267
- header: {
268
- backgroundColor: theme.colors.blue,
269
- paddingHorizontal: theme.spacing.lg,
270
- paddingVertical: theme.spacing.md,
271
- minHeight: moderateScale(200),
272
- },
273
- headerContent: {
274
- flex: 1,
275
- justifyContent: 'space-between',
276
- },
277
- backButton: {
278
- },
279
- clubInfoContainer: {
280
- flexDirection: 'row',
281
- alignItems: 'flex-start',
282
- flex: 1,
283
- marginTop: moderateScale(10)
284
- },
285
- clubLogoContainer: {
286
- marginRight: theme.spacing.md,
287
- },
288
- clubLogo: {
289
- width: moderateScale(60),
290
- height: moderateScale(60),
291
- borderRadius: moderateScale(12),
292
- backgroundColor: theme.colors.white,
293
- justifyContent: 'center',
294
- alignItems: 'center',
295
- shadowColor: '#000',
296
- shadowOffset: {
297
- width: 0,
298
- height: 2,
299
- },
300
- shadowOpacity: 0.1,
301
- shadowRadius: 4,
302
- elevation: 3,
303
- },
304
- clubDetails: {
305
- flex: 1,
306
- justifyContent: 'space-between',
307
- },
308
- clubName: {
309
- fontFamily: Fonts.outfitBold,
310
- fontSize: moderateScale(18),
311
- color: theme.colors.white,
312
- marginBottom: theme.spacing.sm,
313
- },
314
- memberInfoRow: {
315
- flexDirection: 'row',
316
- alignItems: 'center',
317
- justifyContent: 'space-between',
318
- marginBottom: theme.spacing.sm,
319
- },
320
- memberCountContainer: {
321
- flexDirection: 'row',
322
- alignItems: 'center',
323
- },
324
- memberCount: {
325
- fontFamily: Fonts.outfitRegular,
326
- fontSize: moderateScale(14),
327
- color: theme.colors.appleGreen,
328
- marginLeft: theme.spacing.xs,
329
- },
330
- clubCode: {
331
- fontFamily: Fonts.outfitRegular,
332
- fontSize: moderateScale(14),
333
- color: theme.colors.appleGreen,
334
- alignSelf: 'flex-end',
335
- },
336
- addressContainer: {
337
- flexDirection: 'row',
338
- alignItems: 'center',
339
- },
340
- clubAddress: {
341
- fontFamily: Fonts.outfitRegular,
342
- fontSize: moderateScale(12),
343
- color: theme.colors.white,
344
- marginLeft: theme.spacing.xs,
345
- flex: 1,
346
- },
347
-
348
- content: {
349
- flex: 1,
350
- backgroundColor: theme.colors.background,
351
- borderTopLeftRadius: moderateScale(30),
352
- borderTopRightRadius: moderateScale(30),
353
- paddingTop: theme.spacing.xl,
354
- },
355
- titleSection: {
356
- paddingHorizontal: theme.spacing.lg,
357
- marginBottom: theme.spacing.xl,
358
- },
359
- mainTitle: {
360
- fontFamily: Fonts.outfitRegular,
361
- fontSize: moderateScale(12),
362
- color: theme.colors.blue,
363
- marginBottom: theme.spacing.sm,
364
- marginLeft: theme.spacing.lg,
365
-
366
- },
367
- subtitle: {
368
- fontFamily: Fonts.outfitRegular,
369
- fontSize: moderateScale(12),
370
- color: theme.colors.text,
371
- lineHeight: moderateScale(22),
372
- marginLeft: theme.spacing.lg,
373
- },
374
- scrollContainer: {
375
- flex: 1,
376
- },
377
- scrollContent: {
378
- paddingHorizontal: theme.spacing.lg,
379
- paddingBottom: theme.spacing.xl,
380
- },
381
- cardsGrid: {
382
- flexDirection: 'row',
383
- flexWrap: 'wrap',
384
- justifyContent: 'space-between',
385
- marginTop: theme.spacing.md,
386
- },
387
- featureCard: {
388
- width: '48%',
389
- backgroundColor: theme.colors.background,
390
- borderRadius: moderateScale(16),
391
- padding: theme.spacing.md,
392
- marginBottom: theme.spacing.md,
393
- shadowColor: '#000',
394
- shadowOffset: {
395
- width: 0,
396
- height: 2,
397
- },
398
- shadowOpacity: 0.1,
399
- shadowRadius: 4,
400
- elevation: 5,
401
- },
402
- cardHeader: {
403
- flexDirection: 'row',
404
- justifyContent: 'space-between',
405
- alignItems: 'flex-start',
406
- marginBottom: theme.spacing.md,
407
- },
408
- iconContainer: {
409
- width: moderateScale(60),
410
- height: moderateScale(60),
411
- borderRadius: moderateScale(16),
412
- backgroundColor: theme.colors.white,
413
- justifyContent: 'center',
414
- alignItems: 'center',
415
-
416
- },
417
- notificationBadge: {
418
- backgroundColor: theme.colors.error,
419
- borderRadius: moderateScale(10),
420
- minWidth: moderateScale(25),
421
- height: moderateScale(20),
422
- justifyContent: 'center',
423
- alignItems: 'center',
424
- position: 'absolute',
425
- right: moderateScale(-10),
426
- top: moderateScale(-10),
427
- },
428
- notificationText: {
429
- fontFamily: Fonts.outfitSemiBold,
430
- fontSize: moderateScale(12),
431
- color: theme.colors.white,
432
- },
433
- cardTitle: {
434
- fontFamily: Fonts.outfitSemiBold,
435
- fontSize: moderateScale(16),
436
- color: theme.colors.text,
437
- marginBottom: theme.spacing.xs,
438
- },
439
- cardDescription: {
440
- fontFamily: Fonts.outfitRegular,
441
- fontSize: moderateScale(12),
442
- color: theme.colors.textSecondary,
443
- lineHeight: moderateScale(16),
444
- },
445
- placeholderLogo: {
446
- width: '100%',
447
- height: '100%',
448
- borderWidth: 1,
449
- borderColor: theme.colors.imageBorder,
450
- backgroundColor: theme.colors.background,
451
- borderRadius: theme.borderRadius.md,
452
- justifyContent: 'center',
453
- alignItems: 'center',
454
- },
455
- loadingIndicator: {
456
- position: 'absolute',
457
- top: 0,
458
- left: 0,
459
- right: 0,
460
- bottom: 0,
461
- },
462
- userDetailsSty: {
463
- width: moderateScale(30),
464
- height: moderateScale(30),
465
- borderRadius: moderateScale(15),
466
- resizeMode: 'cover',
467
- },
468
- userDefaultIcone: {
469
- width: moderateScale(30),
470
- height: moderateScale(30),
471
- borderRadius: moderateScale(10)
472
- },
473
- placeholderLogoHeader: {
474
- width: moderateScale(20),
475
- height: moderateScale(20),
476
- borderRadius: moderateScale(10),
477
- alignItems: 'center',
478
- justifyContent: 'center'
479
- },
480
- userNameSty: {
481
- marginTop: moderateScale(5),
482
- color: theme.colors.white,
483
- fontFamily: Fonts.outfitMedium,
484
- fontSize: moderateScale(15)
485
- },
486
- userConSty: {
487
- marginHorizontal: moderateScale(10),
488
- width: moderateScale(30),
489
- height: moderateScale(30),
490
- borderRadius: moderateScale(15),
491
- borderWidth: 1.5,
492
- borderColor: theme.colors.imageBorder,
493
- backgroundColor: theme.colors.background,
494
- alignItems: 'center',
495
- justifyContent: 'center'
496
- }
497
- });