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.
Files changed (41) hide show
  1. package/package.json +3 -3
  2. package/template/src/navigation/AuthStack.tsx +6 -25
  3. package/template/src/navigation/MainStack.tsx +0 -148
  4. package/template/src/navigation/RootNavigator.tsx +4 -26
  5. package/template/src/navigation/index.ts +0 -1
  6. package/template/src/navigation/navigationRef.ts +1 -1
  7. package/template/src/screens/HomeScreen.tsx +3 -215
  8. package/template/src/screens/auth/LoginScreen.tsx +13 -13
  9. package/template/src/screens/auth/index.ts +1 -6
  10. package/template/src/screens/index.ts +0 -35
  11. package/template/src/services/api.ts +5 -5
  12. package/template/src/services/authService.ts +3 -299
  13. package/template/src/services/mainServices.ts +19 -1914
  14. package/template/src/types/navigation.ts +5 -155
  15. package/template/src/utils/index.ts +5 -8
  16. package/template/src/navigation/MiddleStack.tsx +0 -35
  17. package/template/src/screens/auth/AddMamber.tsx +0 -428
  18. package/template/src/screens/auth/ForgotPasswordScreen.tsx +0 -176
  19. package/template/src/screens/auth/OTPVerifyScreen.tsx +0 -359
  20. package/template/src/screens/auth/RegisterScreen.tsx +0 -430
  21. package/template/src/screens/auth/SuccessScreen.tsx +0 -201
  22. package/template/src/screens/chat/ChatScreen.tsx +0 -1819
  23. package/template/src/screens/chat/ChatThreadsScreen.tsx +0 -360
  24. package/template/src/screens/chat/ReportMessageScreen.tsx +0 -238
  25. package/template/src/screens/clubs/Announcements.tsx +0 -426
  26. package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +0 -568
  27. package/template/src/screens/clubs/ClubDeteils.tsx +0 -497
  28. package/template/src/screens/clubs/JoinClub.tsx +0 -841
  29. package/template/src/screens/events/EventScreen.tsx +0 -460
  30. package/template/src/screens/raffles/MyReferralMembersScreen.tsx +0 -758
  31. package/template/src/screens/raffles/RaffleDetailsScreen.tsx +0 -762
  32. package/template/src/screens/raffles/RafflesScreen.tsx +0 -495
  33. package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +0 -390
  34. package/template/src/screens/teams/JoinTeamScreen.tsx +0 -464
  35. package/template/src/screens/teams/MyTeamDetailsScreen.tsx +0 -979
  36. package/template/src/screens/teams/MyTeamScreen.tsx +0 -568
  37. package/template/src/screens/teams/PendingRequestsScreen.tsx +0 -426
  38. package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +0 -631
  39. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +0 -1049
  40. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +0 -608
  41. package/template/src/utils/ClubSearchManager.ts +0 -222
@@ -1,430 +0,0 @@
1
- import React, { useState, useRef, use } from 'react';
2
- import {
3
- View,
4
- Text,
5
- StyleSheet,
6
- ImageBackground,
7
- TouchableOpacity,
8
- Linking,
9
- Platform,
10
- Keyboard,
11
- } from 'react-native';
12
- import { Button, hideLoader, showLoader, TextInput } from '../../components/common';
13
- import { ImagePickerComponent } from '../../components/common/ImagePicker';
14
- import { theme } from '../../constants';
15
- import { Strings } from '../../constants/strings';
16
- import { validateEmail, validatePassword, validatePhoneNumber, validateRequired, ImagePickerResult } from '../../utils';
17
- import { getApiErrorInfo, useRegister } from '../../services/authService';
18
- import { moderateScale, verticalScale } from '../../utils/scaling';
19
- import { Fonts } from '../../constants/Fonts';
20
- import { SafeAreaView } from 'react-native-safe-area-context';
21
- import { StatusBar } from 'react-native';
22
- import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
23
- import Images from '../../assets/images';
24
- import SVG from '../../assets/icons';
25
- import ToastManager from '../../components/common/ToastManager';
26
- import { useImageUpload } from '../../hooks/useImageUpload';
27
- import { UploadState } from '../../hooks';
28
- interface RegisterScreenProps {
29
- navigation: any;
30
- }
31
-
32
- export const RegisterScreen: React.FC<RegisterScreenProps> = ({ navigation }) => {
33
- const [formData, setFormData] = useState({
34
- name: '',
35
- email: '',
36
- phone_number: '',
37
- password: '',
38
- confirmPassword: '',
39
- });
40
- const [isChecked, setIsChecked] = useState(false);
41
- const [selectedImage, setSelectedImage] = useState<string | null>(null);
42
- const [lastImageResult, setLastImageResult] = useState<ImagePickerResult | null>(null);
43
- const registerMutation = useRegister();
44
- const [ imageUploadState, resetImageUploadState ] = useState<UploadState>({
45
- isUploading: false,
46
- progress: 0,
47
- error: null,
48
- uploadedUrl: null,
49
- isRetrying: false,
50
- retryCount: 0,
51
- });
52
-
53
-
54
- // Refs for password fields
55
- const passwordRef = useRef<any>(null);
56
- const confirmPasswordRef = useRef<any>(null);
57
- const emailRef = useRef<any>(null);
58
- const phoneRef = useRef<any>(null);
59
-
60
- // Image upload hook
61
- const {
62
- uploadState,
63
- uploadImage,
64
- } = useImageUpload({
65
- containerName: 'user',
66
- maxRetries: 3,
67
- retryDelay: 1000,
68
- onUploadStart: () => {
69
- console.log('Upload started');
70
- },
71
- onUploadProgress: (progress) => {
72
- resetImageUploadState(prev => ({ ...prev, progress }));
73
- },
74
- onUploadSuccess: (url) => {
75
- resetImageUploadState(prev => ({ ...prev, uploadedUrl: url }));
76
- console.log('Upload successful:', url);
77
- },
78
- onUploadError: (error) => {
79
- resetImageUploadState(prev => ({ ...prev, error }));
80
- console.error('Upload error:', error);
81
- ToastManager.error('Upload Failed', error);
82
- },
83
- onUploadComplete: () => {
84
- resetImageUploadState(prev => ({ ...prev, progress: 0 }));
85
- console.log('Upload completed');
86
- },
87
- });
88
-
89
- const handleImageSelected = async (result: ImagePickerResult) => {
90
- setSelectedImage(result.uri);
91
- setLastImageResult(result);
92
- // Start upload using the hook
93
- const uploadResult = await uploadImage(result);
94
- if (uploadResult.success) {
95
- console.log('Image uploaded successfully:', uploadResult);
96
- } else {
97
- console.error('Image upload failed:', uploadResult.error);
98
- }
99
- };
100
-
101
-
102
-
103
- const handleImageError = (error: string) => {
104
- ToastManager.error('Error', error);
105
- };
106
-
107
- const validateForm = () => {
108
- if (!validateRequired(formData.name)) {
109
- ToastManager.error(Strings.AUTH.NAME_REQUIRED);
110
- return false;
111
- }
112
-
113
- if (!formData.email.trim()) {
114
- ToastManager.error(Strings.AUTH.EMAIL_REQUIRED);
115
- return false;
116
- } else if (!validateEmail(formData.email)) {
117
- ToastManager.error(Strings.AUTH.VALID_EMAIL_REQUIRED);
118
- return false;
119
- }
120
- if (!formData.phone_number.trim()) {
121
- ToastManager.error(Strings.AUTH.PHONE_NUMBER_REQUIRED);
122
- return false;
123
- } else if (!validatePhoneNumber(formData.phone_number)) {
124
- ToastManager.error(Strings.AUTH.VALID_PHONE_NUMBER_REQUIRED);
125
- return false;
126
- }
127
-
128
- if (!formData.password.trim()) {
129
- ToastManager.error(Strings.AUTH.PASSWORD_REQUIRED);
130
- return false;
131
- } else if (!validatePassword(formData.password)) {
132
- ToastManager.error(Strings.AUTH.PASSWORD_MIN_LENGTH);
133
- return false;
134
- }
135
-
136
- if (!formData.confirmPassword.trim()) {
137
- ToastManager.error(Strings.AUTH.CONFIRM_PASSWORD_REQUIRED);
138
- return false;
139
- } else if (formData.password !== formData.confirmPassword) {
140
- ToastManager.error( Strings.AUTH.PASSWORDS_DO_NOT_MATCH);
141
- return false;
142
- }
143
-
144
- return true;
145
- };
146
-
147
- const handleRegister = async () => {
148
-
149
- if (!validateForm()) return;
150
- Keyboard.dismiss();
151
- showLoader();
152
-
153
- await registerMutation.mutateAsync({
154
- email: formData.email,
155
- name: formData.name,
156
- profileImage: lastImageResult?.fileName || '',
157
- phoneNumber: formData.phone_number,
158
- password: formData.password,
159
- confirmPassword: formData.confirmPassword,
160
- }, {
161
- onSuccess: (response: any) => {
162
- if (response.status === 409) {
163
- ToastManager.error(response.data.message || 'OTP verification required');
164
- navigation.navigate('OTPVerify', { email: formData.email });
165
- } else {
166
- navigation.navigate('OTPVerify', { email: formData.email });
167
- }
168
- },
169
- onError: (error) => {
170
- const errorInfo = getApiErrorInfo(error);
171
- console.log('Register error===>>>>', errorInfo);
172
- ToastManager.error(errorInfo.message);
173
- console.error('Register error:', errorInfo);
174
- },
175
- onSettled: () => {
176
- hideLoader();
177
- }
178
- });
179
-
180
-
181
- };
182
-
183
-
184
-
185
- const onNameChange = (text: string) => {
186
- const trimmedText = text.trimStart();
187
- setFormData(prev => ({ ...prev, name: trimmedText }));
188
- };
189
-
190
- const onEmailChange = (text: string) => {
191
- const trimmedText = text.trim();
192
- setFormData(prev => ({ ...prev, email: trimmedText }));
193
- };
194
-
195
- const onPhoneChange = (text: string) => {
196
- // Remove all non-numeric characters
197
- const numericText = text.replace(/[^0-9]/g, '');
198
- setFormData(prev => ({ ...prev, phone_number: numericText }));
199
- };
200
-
201
- const onPasswordChange = (text: string) => {
202
- const trimmedText = text.trim();
203
- setFormData(prev => ({ ...prev, password: trimmedText }));
204
- };
205
-
206
- const onConfirmPasswordChange = (text: string) => {
207
- const trimmedText = text.trim();
208
- setFormData(prev => ({ ...prev, confirmPassword: trimmedText }));
209
- };
210
-
211
-
212
- return (
213
- <ImageBackground
214
- source={Images.backgroundImage}
215
- style={styles.backgroundImage}
216
- resizeMode="contain"
217
- >
218
- <SafeAreaView edges={['top']} style={{ flex: 1 }}>
219
- <StatusBar
220
- barStyle="dark-content"
221
- backgroundColor={theme.colors.background}
222
- translucent={Platform.OS === 'android' ? true : false}
223
- />
224
- <KeyboardAwareScrollView
225
- enableOnAndroid={true}
226
- contentContainerStyle={styles.container}
227
- keyboardShouldPersistTaps="handled"
228
- extraScrollHeight={Platform.OS === 'ios' ? 100 : 150}
229
- extraHeight={Platform.OS === 'ios' ? 100 : 150}
230
- showsVerticalScrollIndicator={false}
231
- enableAutomaticScroll={true}
232
- scrollEventThrottle={16}
233
- keyboardOpeningTime={250}
234
- enableResetScrollToCoords={false}
235
- >
236
- <TouchableOpacity style={{marginLeft: theme.spacing.md, marginTop: theme.spacing.md}} onPress={() => navigation.reset({index: 0, routes: [{name: 'Login'}]})}>
237
- <SVG.arrowLeft height={moderateScale(30)} width={moderateScale(30)} style={styles.logoIcon} />
238
- </TouchableOpacity>
239
- <View style={styles.logoSection}>
240
- <ImagePickerComponent
241
- progress={imageUploadState?.progress}
242
- loading={uploadState.isUploading}
243
- defaultIcon={SVG.uploadImageProfile}
244
- onImageSelected={handleImageSelected}
245
- onError={handleImageError}
246
- imageUri={selectedImage}
247
- options={{
248
- allowsEditing: true,
249
- aspect: [1, 1],
250
- quality: 0.8,
251
- }}
252
- style={styles.imagePicker}
253
- />
254
- </View>
255
-
256
- {/* Login Form */}
257
- <View style={styles.loginSection}>
258
- <Text style={styles.loginTitle}>{Strings.AUTH.SIGN_UP_TITLE}</Text>
259
- <View style={styles.form}>
260
- <TextInput
261
- label={Strings.COMMON.NAME}
262
- value={formData.name}
263
- onChangeText={onNameChange}
264
- placeholder={Strings.COMMON.NAME_PLACEHOLDER}
265
- keyboardType="default"
266
- autoCapitalize="words"
267
- autoCorrect={false}
268
- variant="outlined"
269
- leftIcon={SVG.user}
270
- maxLength={30}
271
- returnKeyType="next"
272
- onSubmitEditing={() => emailRef.current?.focus()}
273
- />
274
-
275
- <TextInput
276
- ref={emailRef}
277
- label={Strings.COMMON.EMAIL}
278
- value={formData.email}
279
- onChangeText={onEmailChange}
280
- placeholder={Strings.COMMON.EMAIL_PLACEHOLDER}
281
- keyboardType="email-address"
282
- autoCapitalize="none"
283
- autoCorrect={false}
284
- variant="outlined"
285
- leftIcon={SVG.Email}
286
- maxLength={50}
287
- returnKeyType="next"
288
- onSubmitEditing={() => phoneRef.current?.focus()}
289
- />
290
-
291
- <TextInput
292
- ref={phoneRef}
293
- label={Strings.COMMON.PHONE}
294
- value={formData.phone_number}
295
- onChangeText={onPhoneChange}
296
- placeholder={Strings.COMMON.PHONE_PLACEHOLDER}
297
- keyboardType="phone-pad"
298
- autoCapitalize="none"
299
- autoCorrect={false}
300
- variant="outlined"
301
- leftIcon={SVG.phone}
302
- maxLength={10}
303
- returnKeyType="next"
304
- onSubmitEditing={() => passwordRef.current?.focus()}
305
- />
306
-
307
- <TextInput
308
-
309
- ref={passwordRef}
310
- label={Strings.COMMON.PASSWORD}
311
- value={formData.password}
312
- onChangeText={onPasswordChange}
313
- placeholder={Strings.COMMON.PASSWORD_PLACEHOLDER}
314
- secureTextEntry
315
- autoCapitalize="none"
316
- autoCorrect={false}
317
- leftIcon={SVG.Password}
318
- showPasswordToggle
319
- variant="outlined"
320
- maxLength={30}
321
- returnKeyType="next"
322
- onSubmitEditing={() => confirmPasswordRef.current?.focus()}
323
- />
324
- <TextInput
325
- ref={confirmPasswordRef}
326
- label={Strings.COMMON.CONFIRM_PASSWORD}
327
- value={formData.confirmPassword}
328
- onChangeText={onConfirmPasswordChange}
329
- placeholder={Strings.COMMON.PASSWORD_PLACEHOLDER}
330
- secureTextEntry
331
- autoCapitalize="none"
332
- autoCorrect={false}
333
- leftIcon={SVG.Password}
334
- showPasswordToggle
335
- variant="outlined"
336
- maxLength={30}
337
- returnKeyType="done"
338
- onSubmitEditing={() => handleRegister()}
339
- />
340
-
341
- <View style={styles.TandCStyle}>
342
- <TouchableOpacity onPress={() => setIsChecked(!isChecked)}>
343
- {isChecked ? <SVG.check width={moderateScale(25)} height={moderateScale(25)} /> : <SVG.uncheck width={moderateScale(25)} height={moderateScale(25)} />}
344
- </TouchableOpacity>
345
- <Text style={styles.TandCText}>
346
- <Text style={styles.iAgreeToStyle}>By signing up, I agree to My Sport Club{'\n'}</Text>
347
- <Text onPress={() => Linking.openURL('https://www.google.com')} style={styles.underlineTxt}>Terms & Conditions</Text>
348
- <Text style={styles.iAgreeToStyle}> | </Text>
349
- <Text onPress={() => Linking.openURL('https://www.google.com')} style={styles.underlineTxt}>Privacy Policy</Text>
350
- </Text>
351
- </View>
352
-
353
- <Button
354
- disabled={!isChecked}
355
- title={Strings.COMMON.SIGN_UP}
356
- onPress={handleRegister}
357
- variant="primary"
358
- size="medium"
359
- />
360
-
361
- </View>
362
- </View>
363
- </KeyboardAwareScrollView>
364
- </SafeAreaView>
365
- </ImageBackground>
366
- );
367
- };
368
-
369
- const styles = StyleSheet.create({
370
- backgroundImage: {
371
- flex: 1,
372
- width: '100%',
373
- height: '100%',
374
- },
375
- container: {
376
- flexGrow: 1,
377
- },
378
- // Logo Section
379
- logoSection: {
380
- justifyContent: 'center',
381
- alignItems: 'center',
382
- marginTop: verticalScale(10),
383
- marginBottom: verticalScale(30),
384
- },
385
- logoIcon: {
386
- marginBottom: theme.spacing.md,
387
- },
388
- imagePicker: {
389
- width: moderateScale(150),
390
- height: moderateScale(150),
391
- },
392
- // Login Section
393
- loginSection: {
394
- flex: 1,
395
- backgroundColor: theme.colors.background,
396
- paddingHorizontal: theme.spacing.lg,
397
- borderTopLeftRadius: moderateScale(30),
398
- borderTopRightRadius: moderateScale(30),
399
- paddingTop: moderateScale(20),
400
- paddingBottom: theme.spacing.xl,
401
- },
402
- loginTitle: {
403
- fontFamily: Fonts.outfitSemiBold,
404
- fontSize: moderateScale(24),
405
- color: theme.colors.black,
406
- marginBottom: theme.spacing.md,
407
- },
408
- form: {
409
- gap: theme.spacing.sm,
410
- paddingBottom: theme.spacing.md,
411
- },
412
- TandCStyle: {
413
- flex: 1,
414
- flexDirection: 'row',
415
- marginTop: theme.spacing.md,
416
- },
417
- TandCText: {
418
- marginLeft: theme.spacing.sm,
419
- },
420
- iAgreeToStyle: {
421
- fontFamily: Fonts.outfitRegular,
422
- fontSize: moderateScale(15),
423
- color: theme.colors.black
424
- }, underlineTxt: {
425
- fontFamily: Fonts.outfitSemiBold,
426
- fontSize: moderateScale(15),
427
- color: theme.colors.appleGreen,
428
- textDecorationLine: 'underline'
429
- }
430
- });
@@ -1,201 +0,0 @@
1
- import React from 'react';
2
- import {
3
- View,
4
- Text,
5
- StyleSheet,
6
- TouchableOpacity,
7
- Dimensions,
8
- Modal,
9
- } from 'react-native';
10
- import SVG from '../../assets/icons';
11
- import { Fonts } from '../../constants/Fonts';
12
- import { theme } from '../../constants/theme';
13
- import { moderateScale } from '../../utils/scaling';
14
- import { Button } from '../../components/common';
15
- import { SuccessScreenProps } from '../../types/navigation';
16
-
17
- const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get('window');
18
-
19
- interface SuccessModalProps {
20
- visible: boolean;
21
- userName?: string;
22
- onClose: () => void;
23
- onGoToHome?: () => void;
24
- onSkipToAddMember?: () => void;
25
- }
26
-
27
- const SuccessModal: React.FC<SuccessModalProps> = ({
28
- visible,
29
- userName = 'Peter',
30
- onClose,
31
- onGoToHome,
32
- onSkipToAddMember,
33
- }) => {
34
- const handleSkipToAddMember = () => {
35
- onClose();
36
- onSkipToAddMember?.();
37
- };
38
-
39
- return (
40
- <Modal
41
- visible={visible}
42
- animationType="slide"
43
- transparent={true}
44
- onRequestClose={onClose}
45
- >
46
- <TouchableOpacity
47
- style={styles.modalOverlay}
48
- activeOpacity={1}
49
- onPress={onClose}
50
- >
51
- <TouchableOpacity
52
- style={styles.modalContainer}
53
- activeOpacity={1}
54
- onPress={(e) => e.stopPropagation()}
55
- >
56
- <View style={styles.content}>
57
- {/* Success Icon */}
58
- <View style={styles.iconContainer}>
59
- <SVG.SuccessIcone width={moderateScale(92)} height={moderateScale(92)} />
60
- </View>
61
-
62
- {/* Success Message */}
63
- <Text style={styles.successTitle}>Successfully Registered!</Text>
64
-
65
- {/* Welcome Message */}
66
- <Text style={styles.welcomeText}>Welcome, {userName}!</Text>
67
-
68
- {/* Description */}
69
- <Text style={styles.descriptionText}>
70
- Join the club and explore the upcoming events, matches, and activities and more.
71
- </Text>
72
-
73
- {/* Action Buttons */}
74
- <View style={styles.buttonContainer}>
75
- <Button
76
- title="Go to Home"
77
- onPress={onGoToHome}
78
- variant="primary"
79
- size="medium"
80
- style={styles.goToHomeButton}
81
- />
82
-
83
- <TouchableOpacity
84
- style={styles.skipButton}
85
- onPress={handleSkipToAddMember}
86
- activeOpacity={0.8}
87
- >
88
- <Text style={styles.skipButtonText}>Tap to Skip & Add Member</Text>
89
- </TouchableOpacity>
90
- </View>
91
- </View>
92
- </TouchableOpacity>
93
- </TouchableOpacity>
94
- </Modal>
95
- );
96
- };
97
-
98
- const styles = StyleSheet.create({
99
- modalOverlay: {
100
- flex: 1,
101
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
102
- justifyContent: 'center',
103
- alignItems: 'center',
104
- width: SCREEN_WIDTH,
105
- height: SCREEN_HEIGHT,
106
- },
107
- modalContainer: {
108
- width: SCREEN_WIDTH * 0.9,
109
- maxHeight: SCREEN_HEIGHT * 0.8,
110
- backgroundColor: theme.colors.white,
111
- borderRadius: theme.borderRadius.xl,
112
- overflow: 'hidden',
113
- shadowColor: '#000',
114
- shadowOffset: {
115
- width: 0,
116
- height: 4,
117
- },
118
- shadowOpacity: 0.25,
119
- shadowRadius: 8,
120
- elevation: 8,
121
- padding: theme.spacing.lg,
122
- },
123
- content: {
124
- justifyContent: 'center',
125
- alignItems: 'center',
126
- },
127
- iconContainer: {
128
- marginBottom: theme.spacing.xl,
129
- },
130
- successTitle: {
131
- fontFamily: Fonts.outfitMedium,
132
- fontSize: theme.typography.fontSize.xl,
133
- color: theme.colors.appleGreen,
134
- textAlign: 'center',
135
- marginBottom: theme.spacing.sm,
136
- },
137
- welcomeText: {
138
- fontFamily: Fonts.outfitRegular,
139
- fontSize: theme.typography.fontSize.lg,
140
- color: theme.colors.text,
141
- textAlign: 'center',
142
- marginBottom: theme.spacing.md,
143
- },
144
- descriptionText: {
145
- fontFamily: Fonts.outfitRegular,
146
- fontSize: theme.typography.fontSize.md,
147
- color: theme.colors.text,
148
- textAlign: 'center',
149
- lineHeight: theme.typography.fontSize.md * 1.5,
150
- marginBottom: theme.spacing.xl,
151
- },
152
- buttonContainer: {
153
- width: '100%',
154
- gap: theme.spacing.md,
155
- },
156
- goToHomeButton: {
157
- width: '100%',
158
- },
159
- skipButton: {
160
- alignItems: 'center',
161
- paddingVertical: theme.spacing.sm,
162
- paddingHorizontal: theme.spacing.md,
163
- },
164
- skipButtonText: {
165
- fontFamily: Fonts.outfitMedium,
166
- fontSize: theme.typography.fontSize.sm,
167
- color: theme.colors.textSecondary,
168
- textDecorationLine: 'underline',
169
- },
170
- });
171
-
172
- // Wrapper component for backward compatibility
173
- const SuccessScreen: React.FC<SuccessScreenProps> = ({
174
- navigation,
175
- }) => {
176
- const [showModal, setShowModal] = React.useState(true);
177
- const userName = 'Peter';
178
-
179
- const handleGoToHome = () => {
180
- setShowModal(false);
181
- navigation.navigate('Home' as never);
182
- };
183
-
184
- const handleSkipToAddMember = () => {
185
- setShowModal(false);
186
- navigation.navigate('AddMember' as never);
187
- };
188
-
189
- return (
190
- <SuccessModal
191
- visible={showModal}
192
- userName={userName}
193
- onClose={() => setShowModal(false)}
194
- onGoToHome={handleGoToHome}
195
- onSkipToAddMember={handleSkipToAddMember}
196
- />
197
- );
198
- };
199
-
200
- export { SuccessModal };
201
- export default SuccessScreen;