create-gufran-expo-app 2.0.0 → 2.0.2

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 (266) hide show
  1. package/lib/createApp.js +7 -2
  2. package/package.json +1 -1
  3. package/template/App.tsx +118 -0
  4. package/template/ReactotronConfig.js +5 -0
  5. package/template/android/app/build.gradle +184 -0
  6. package/template/android/app/debug.keystore +0 -0
  7. package/template/android/app/google-services.json +29 -0
  8. package/template/android/app/proguard-rules.pro +14 -0
  9. package/template/android/app/src/debug/AndroidManifest.xml +7 -0
  10. package/template/android/app/src/debugOptimized/AndroidManifest.xml +7 -0
  11. package/template/android/app/src/main/AndroidManifest.xml +28 -0
  12. package/template/android/app/src/main/assets/fonts/Outfit-Bold.ttf +0 -0
  13. package/template/android/app/src/main/assets/fonts/Outfit-Light.ttf +0 -0
  14. package/template/android/app/src/main/assets/fonts/Outfit-Medium.ttf +0 -0
  15. package/template/android/app/src/main/assets/fonts/Outfit-Regular.ttf +0 -0
  16. package/template/android/app/src/main/assets/fonts/Outfit-SemiBold.ttf +0 -0
  17. package/template/android/app/src/main/java/com/club/yakka/MainActivity.kt +61 -0
  18. package/template/android/app/src/main/java/com/club/yakka/MainApplication.kt +60 -0
  19. package/template/android/app/src/main/res/drawable/ic_launcher_background.xml +6 -0
  20. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  21. package/template/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
  22. package/template/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
  23. package/template/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
  24. package/template/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
  25. package/template/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
  26. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  27. package/template/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  28. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  29. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
  30. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  31. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  32. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
  33. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  34. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  35. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
  36. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  37. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  38. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
  39. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  40. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  41. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
  42. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  43. package/template/android/app/src/main/res/values/colors.xml +6 -0
  44. package/template/android/app/src/main/res/values/strings.xml +5 -0
  45. package/template/android/app/src/main/res/values/styles.xml +14 -0
  46. package/template/android/app/src/main/res/values-night/colors.xml +1 -0
  47. package/template/android/build.gradle +33 -0
  48. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  50. package/template/android/gradle.properties +65 -0
  51. package/template/android/gradlew +251 -0
  52. package/template/android/gradlew.bat +94 -0
  53. package/template/android/settings.gradle +39 -0
  54. package/template/app.json +69 -0
  55. package/template/assets/adaptive-icon.png +0 -0
  56. package/template/assets/adaptive-icon1.png +0 -0
  57. package/template/assets/app_icon.png +0 -0
  58. package/template/assets/favicon.png +0 -0
  59. package/template/assets/icon.png +0 -0
  60. package/template/assets/splash-icon.png +0 -0
  61. package/template/babel-plugin-disable-font-scaling.js +41 -0
  62. package/template/babel.config.js +28 -0
  63. package/template/firebase.json +5 -0
  64. package/template/index.ts +24 -0
  65. package/template/ios/.xcode.env +11 -0
  66. package/template/ios/ClubYakka/AppDelegate.swift +74 -0
  67. package/template/ios/ClubYakka/ClubYakka-Bridging-Header.h +3 -0
  68. package/template/ios/ClubYakka/ClubYakka.entitlements +8 -0
  69. package/template/ios/ClubYakka/GoogleService-Info.plist +30 -0
  70. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
  71. package/template/ios/ClubYakka/Images.xcassets/AppIcon.appiconset/Contents.json +14 -0
  72. package/template/ios/ClubYakka/Images.xcassets/Contents.json +6 -0
  73. package/template/ios/ClubYakka/Images.xcassets/SplashScreenBackground.colorset/Contents.json +20 -0
  74. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/Contents.json +23 -0
  75. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image.png +0 -0
  76. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@2x.png +0 -0
  77. package/template/ios/ClubYakka/Images.xcassets/SplashScreenLegacy.imageset/image@3x.png +0 -0
  78. package/template/ios/ClubYakka/Info.plist +101 -0
  79. package/template/ios/ClubYakka/PrivacyInfo.xcprivacy +50 -0
  80. package/template/ios/ClubYakka/SplashScreen.storyboard +48 -0
  81. package/template/ios/ClubYakka/Supporting/Expo.plist +12 -0
  82. package/template/ios/ClubYakka.xcodeproj/project.pbxproj +669 -0
  83. package/template/ios/ClubYakka.xcodeproj/xcshareddata/xcschemes/ClubYakka.xcscheme +88 -0
  84. package/template/ios/ClubYakka.xcworkspace/contents.xcworkspacedata +10 -0
  85. package/template/ios/ClubYakka.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
  86. package/template/ios/Podfile +84 -0
  87. package/template/ios/Podfile.lock +2698 -0
  88. package/template/ios/Podfile.properties.json +8 -0
  89. package/template/metro.config.js +17 -0
  90. package/template/package.json +70 -0
  91. package/template/patches/react-native-background-upload+6.6.0.patch +704 -0
  92. package/template/react-native.config.js +7 -0
  93. package/template/src/assets/fonts/Outfit-Bold.ttf +0 -0
  94. package/template/src/assets/fonts/Outfit-Light.ttf +0 -0
  95. package/template/src/assets/fonts/Outfit-Medium.ttf +0 -0
  96. package/template/src/assets/fonts/Outfit-Regular.ttf +0 -0
  97. package/template/src/assets/fonts/Outfit-SemiBold.ttf +0 -0
  98. package/template/src/assets/icons/BG.svg +33 -0
  99. package/template/src/assets/icons/Ic_Users.svg +6 -0
  100. package/template/src/assets/icons/arrow-left-white.svg +4 -0
  101. package/template/src/assets/icons/arrow-left.svg +4 -0
  102. package/template/src/assets/icons/bell.svg +4 -0
  103. package/template/src/assets/icons/bottomSheetIcone.svg +3 -0
  104. package/template/src/assets/icons/call.svg +4 -0
  105. package/template/src/assets/icons/camera.svg +0 -0
  106. package/template/src/assets/icons/chatAppleGreenBG.svg +22 -0
  107. package/template/src/assets/icons/check.svg +4 -0
  108. package/template/src/assets/icons/check_Radio.svg +4 -0
  109. package/template/src/assets/icons/chevron-right.svg +3 -0
  110. package/template/src/assets/icons/clubDefauldImage.png +0 -0
  111. package/template/src/assets/icons/curvBackgroundView.svg +3 -0
  112. package/template/src/assets/icons/defaultClub.png +0 -0
  113. package/template/src/assets/icons/email.svg +3 -0
  114. package/template/src/assets/icons/emptyUser.svg +5 -0
  115. package/template/src/assets/icons/eye-Hide.svg +8 -0
  116. package/template/src/assets/icons/eye.svg +4 -0
  117. package/template/src/assets/icons/gallery.svg +4 -0
  118. package/template/src/assets/icons/home.svg +4 -0
  119. package/template/src/assets/icons/ic_Calendar.svg +14 -0
  120. package/template/src/assets/icons/ic_Calendar_blue.svg +12 -0
  121. package/template/src/assets/icons/ic_Calendar_white.svg +12 -0
  122. package/template/src/assets/icons/ic_Chat.svg +14 -0
  123. package/template/src/assets/icons/ic_ChatAppleGreen.svg +21 -0
  124. package/template/src/assets/icons/ic_ChatAppleWhite.svg +21 -0
  125. package/template/src/assets/icons/ic_Download.svg +6 -0
  126. package/template/src/assets/icons/ic_Events.svg +6 -0
  127. package/template/src/assets/icons/ic_HeadCoachIcon.svg +3 -0
  128. package/template/src/assets/icons/ic_Membership.svg +10 -0
  129. package/template/src/assets/icons/ic_Notification.svg +6 -0
  130. package/template/src/assets/icons/ic_Raffles.svg +14 -0
  131. package/template/src/assets/icons/ic_Referral_Members.svg +12 -0
  132. package/template/src/assets/icons/ic_Shop.svg +13 -0
  133. package/template/src/assets/icons/ic_Teams.svg +8 -0
  134. package/template/src/assets/icons/ic_Volunteer.svg +9 -0
  135. package/template/src/assets/icons/ic_add.svg +3 -0
  136. package/template/src/assets/icons/ic_addCircle.svg +5 -0
  137. package/template/src/assets/icons/ic_chatSend.svg +4 -0
  138. package/template/src/assets/icons/ic_chat_blue_bg.svg +22 -0
  139. package/template/src/assets/icons/ic_clock_blue.svg +4 -0
  140. package/template/src/assets/icons/ic_delete.svg +8 -0
  141. package/template/src/assets/icons/ic_more.svg +5 -0
  142. package/template/src/assets/icons/ic_mute.svg +10 -0
  143. package/template/src/assets/icons/ic_pdf.svg +3 -0
  144. package/template/src/assets/icons/ic_pending_AppleGreen.svg +11 -0
  145. package/template/src/assets/icons/ic_right_appleGreen.svg +11 -0
  146. package/template/src/assets/icons/ic_unread_chat_blue_bg.svg +23 -0
  147. package/template/src/assets/icons/ic_volunteer_Member.svg +8 -0
  148. package/template/src/assets/icons/index.ts +144 -0
  149. package/template/src/assets/icons/location-blue.svg +4 -0
  150. package/template/src/assets/icons/location-white.svg +4 -0
  151. package/template/src/assets/icons/location.svg +4 -0
  152. package/template/src/assets/icons/lock.svg +5 -0
  153. package/template/src/assets/icons/log-out.svg +5 -0
  154. package/template/src/assets/icons/login_logo.svg +9 -0
  155. package/template/src/assets/icons/mail.svg +4 -0
  156. package/template/src/assets/icons/or_saprater.svg +5 -0
  157. package/template/src/assets/icons/password.svg +4 -0
  158. package/template/src/assets/icons/profile-appleGreen.svg +6 -0
  159. package/template/src/assets/icons/search.svg +3 -0
  160. package/template/src/assets/icons/settings.svg +4 -0
  161. package/template/src/assets/icons/success.svg +4 -0
  162. package/template/src/assets/icons/unCheck_Radio.svg +3 -0
  163. package/template/src/assets/icons/uncheck.svg +3 -0
  164. package/template/src/assets/icons/upload_Image.svg +6 -0
  165. package/template/src/assets/icons/upload_Image_Member.svg +6 -0
  166. package/template/src/assets/icons/user.svg +4 -0
  167. package/template/src/assets/icons/wifi.svg +1 -0
  168. package/template/src/assets/images/Splash.png +0 -0
  169. package/template/src/assets/images/SplashLogo.png +0 -0
  170. package/template/src/assets/images/background.png +0 -0
  171. package/template/src/assets/images/clubDefauldImage.png +0 -0
  172. package/template/src/assets/images/index.tsx +9 -0
  173. package/template/src/assets/index.ts +1 -0
  174. package/template/src/components/common/AddMemberModal.tsx +543 -0
  175. package/template/src/components/common/AppLoader.tsx +91 -0
  176. package/template/src/components/common/Button.tsx +173 -0
  177. package/template/src/components/common/ClubCard.tsx +248 -0
  178. package/template/src/components/common/Icon.tsx +93 -0
  179. package/template/src/components/common/IconAlt.tsx +65 -0
  180. package/template/src/components/common/IconButton.tsx +92 -0
  181. package/template/src/components/common/ImagePicker.tsx +451 -0
  182. package/template/src/components/common/LoadingSpinner.tsx +30 -0
  183. package/template/src/components/common/OTPInput.tsx +128 -0
  184. package/template/src/components/common/ReminderCalendar.tsx +129 -0
  185. package/template/src/components/common/ReminderCardItem.tsx +91 -0
  186. package/template/src/components/common/SafeAreaWrapper.tsx +27 -0
  187. package/template/src/components/common/SetReminderModal.tsx +308 -0
  188. package/template/src/components/common/SlowInternet.js +57 -0
  189. package/template/src/components/common/TeamCard.tsx +297 -0
  190. package/template/src/components/common/TextInput.tsx +227 -0
  191. package/template/src/components/common/ToastConfig.tsx +103 -0
  192. package/template/src/components/common/ToastManager.ts +86 -0
  193. package/template/src/components/common/UploadProgressModal.tsx +284 -0
  194. package/template/src/components/common/WrapperContainer.tsx +39 -0
  195. package/template/src/components/common/index.ts +19 -0
  196. package/template/src/constants/Constants.tsx +7 -0
  197. package/template/src/constants/Fonts.tsx +30 -0
  198. package/template/src/constants/index.ts +45 -0
  199. package/template/src/constants/strings.ts +211 -0
  200. package/template/src/constants/theme.ts +72 -0
  201. package/template/src/contexts/AuthContext.tsx +268 -0
  202. package/template/src/contexts/index.ts +2 -0
  203. package/template/src/hooks/index.ts +3 -0
  204. package/template/src/hooks/useImageUpload.ts +199 -0
  205. package/template/src/index.ts +8 -0
  206. package/template/src/navigation/AuthStack.tsx +67 -0
  207. package/template/src/navigation/MainStack.tsx +183 -0
  208. package/template/src/navigation/MiddleStack.tsx +35 -0
  209. package/template/src/navigation/RootNavigator.tsx +101 -0
  210. package/template/src/navigation/index.ts +5 -0
  211. package/template/src/navigation/navigationRef.ts +5 -0
  212. package/template/src/providers/QueryProvider.tsx +30 -0
  213. package/template/src/screens/DetailsScreen.tsx +271 -0
  214. package/template/src/screens/HomeScreen.tsx +736 -0
  215. package/template/src/screens/ProfileScreen.tsx +202 -0
  216. package/template/src/screens/SettingsScreen.tsx +253 -0
  217. package/template/src/screens/SportHubScreen.tsx +280 -0
  218. package/template/src/screens/auth/AddMamber.tsx +428 -0
  219. package/template/src/screens/auth/ForgotPasswordScreen.tsx +176 -0
  220. package/template/src/screens/auth/LoginScreen.tsx +286 -0
  221. package/template/src/screens/auth/OTPVerifyScreen.tsx +359 -0
  222. package/template/src/screens/auth/RegisterScreen.tsx +430 -0
  223. package/template/src/screens/auth/SuccessScreen.tsx +201 -0
  224. package/template/src/screens/auth/WalcomeScreen.tsx +274 -0
  225. package/template/src/screens/auth/index.ts +8 -0
  226. package/template/src/screens/chat/ChatScreen.tsx +1819 -0
  227. package/template/src/screens/chat/ChatThreadsScreen.tsx +360 -0
  228. package/template/src/screens/chat/ReportMessageScreen.tsx +238 -0
  229. package/template/src/screens/clubs/Announcements.tsx +426 -0
  230. package/template/src/screens/clubs/BuyRaffleTicketsScreen.tsx +568 -0
  231. package/template/src/screens/clubs/ClubDeteils.tsx +497 -0
  232. package/template/src/screens/clubs/JoinClub.tsx +841 -0
  233. package/template/src/screens/events/EventScreen.tsx +460 -0
  234. package/template/src/screens/index.ts +42 -0
  235. package/template/src/screens/raffles/MyReferralMembersScreen.tsx +758 -0
  236. package/template/src/screens/raffles/RaffleDetailsScreen.tsx +762 -0
  237. package/template/src/screens/raffles/RafflesScreen.tsx +495 -0
  238. package/template/src/screens/raffles/SetRaffleReminderScreen.tsx +390 -0
  239. package/template/src/screens/teams/JoinTeamScreen.tsx +464 -0
  240. package/template/src/screens/teams/MyTeamDetailsScreen.tsx +979 -0
  241. package/template/src/screens/teams/MyTeamScreen.tsx +568 -0
  242. package/template/src/screens/teams/PendingRequestsScreen.tsx +426 -0
  243. package/template/src/screens/volunteerOpportunities/SetReminderScreen.tsx +631 -0
  244. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesDetailsScreen.tsx +1049 -0
  245. package/template/src/screens/volunteerOpportunities/VolunteerOpportunitiesScreen.tsx +608 -0
  246. package/template/src/services/api.ts +167 -0
  247. package/template/src/services/authService.ts +422 -0
  248. package/template/src/services/index.ts +5 -0
  249. package/template/src/services/mainServices.ts +1963 -0
  250. package/template/src/stores/authStore.ts +159 -0
  251. package/template/src/stores/index.ts +2 -0
  252. package/template/src/types/index.ts +85 -0
  253. package/template/src/types/navigation.ts +206 -0
  254. package/template/src/utils/AzureUploaderService.ts +371 -0
  255. package/template/src/utils/ClubSearchManager.ts +222 -0
  256. package/template/src/utils/NotificationManager.ts +503 -0
  257. package/template/src/utils/UploadDebugUtil.ts +107 -0
  258. package/template/src/utils/imagePicker.ts +321 -0
  259. package/template/src/utils/index.ts +111 -0
  260. package/template/src/utils/permissions.ts +277 -0
  261. package/template/src/utils/scaling.ts +14 -0
  262. package/template/src/utils/storage.ts +247 -0
  263. package/template/src/utils/usePermissions.ts +275 -0
  264. package/template/src/utils/validation.ts +340 -0
  265. package/template/tsconfig.json +50 -0
  266. package/template/types/svg.d.ts +6 -0
@@ -0,0 +1,202 @@
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet, Image, ScrollView } from 'react-native';
3
+ import { SafeAreaWrapper, Button } from '../components/common';
4
+ import { ProfileScreenProps } from '../types';
5
+ import { theme } from '../constants';
6
+ import { formatDate } from '../utils';
7
+
8
+ export const ProfileScreen: React.FC<ProfileScreenProps> = ({ route, navigation }) => {
9
+ const { userId } = route.params;
10
+
11
+ // Mock user data - in a real app, you'd fetch this based on userId
12
+ const userData = {
13
+ id: userId,
14
+ name: 'John Doe',
15
+ email: 'john.doe@example.com',
16
+ avatar: 'https://via.placeholder.com/100x100/007AFF/FFFFFF?text=JD',
17
+ bio: 'React Native developer passionate about creating amazing mobile experiences.',
18
+ joinDate: new Date('2023-01-15'),
19
+ location: 'San Francisco, CA',
20
+ followers: 1234,
21
+ following: 567,
22
+ };
23
+
24
+ const goBack = () => {
25
+ navigation.goBack();
26
+ };
27
+
28
+ const navigateToSettings = () => {
29
+ navigation.navigate('Settings');
30
+ };
31
+
32
+ return (
33
+ <SafeAreaWrapper>
34
+ <ScrollView style={styles.container} showsVerticalScrollIndicator={false}>
35
+ <View style={styles.header}>
36
+ <View style={styles.avatarContainer}>
37
+ <Image
38
+ source={{ uri: userData.avatar }}
39
+ style={styles.avatar}
40
+ defaultSource={require('../../assets/adaptive-icon.png')}
41
+ />
42
+ </View>
43
+
44
+ <Text style={styles.name}>{userData.name}</Text>
45
+ <Text style={styles.email}>{userData.email}</Text>
46
+
47
+ {userData.bio && (
48
+ <Text style={styles.bio}>{userData.bio}</Text>
49
+ )}
50
+ </View>
51
+
52
+ <View style={styles.statsContainer}>
53
+ <View style={styles.statItem}>
54
+ <Text style={styles.statNumber}>{userData.followers.toLocaleString()}</Text>
55
+ <Text style={styles.statLabel}>Followers</Text>
56
+ </View>
57
+ <View style={styles.statDivider} />
58
+ <View style={styles.statItem}>
59
+ <Text style={styles.statNumber}>{userData.following.toLocaleString()}</Text>
60
+ <Text style={styles.statLabel}>Following</Text>
61
+ </View>
62
+ </View>
63
+
64
+ <View style={styles.infoSection}>
65
+ <Text style={styles.sectionTitle}>Information</Text>
66
+
67
+ <View style={styles.infoItem}>
68
+ <Text style={styles.infoLabel}>User ID</Text>
69
+ <Text style={styles.infoValue}>{userData.id}</Text>
70
+ </View>
71
+
72
+ <View style={styles.infoItem}>
73
+ <Text style={styles.infoLabel}>Location</Text>
74
+ <Text style={styles.infoValue}>{userData.location}</Text>
75
+ </View>
76
+
77
+ <View style={styles.infoItem}>
78
+ <Text style={styles.infoLabel}>Member Since</Text>
79
+ <Text style={styles.infoValue}>{formatDate(userData.joinDate)}</Text>
80
+ </View>
81
+ </View>
82
+
83
+ <View style={styles.actionSection}>
84
+ <Button
85
+ title="Settings"
86
+ onPress={navigateToSettings}
87
+ variant="primary"
88
+ style={styles.button}
89
+ />
90
+
91
+ <Button
92
+ title="Go Back"
93
+ onPress={goBack}
94
+ variant="outline"
95
+ style={styles.button}
96
+ />
97
+ </View>
98
+ </ScrollView>
99
+ </SafeAreaWrapper>
100
+ );
101
+ };
102
+
103
+ const styles = StyleSheet.create({
104
+ container: {
105
+ flex: 1,
106
+ backgroundColor: theme.colors.background,
107
+ },
108
+ header: {
109
+ alignItems: 'center',
110
+ paddingTop: theme.spacing.xl,
111
+ paddingHorizontal: theme.spacing.lg,
112
+ paddingBottom: theme.spacing.lg,
113
+ },
114
+ avatarContainer: {
115
+ marginBottom: theme.spacing.md,
116
+ },
117
+ avatar: {
118
+ width: 100,
119
+ height: 100,
120
+ borderRadius: 50,
121
+ backgroundColor: theme.colors.surface,
122
+ },
123
+ name: {
124
+ fontSize: theme.typography.fontSize.xl,
125
+ fontWeight: theme.typography.fontWeight.bold,
126
+ color: theme.colors.text,
127
+ marginBottom: theme.spacing.xs,
128
+ },
129
+ email: {
130
+ fontSize: theme.typography.fontSize.md,
131
+ color: theme.colors.textSecondary,
132
+ marginBottom: theme.spacing.md,
133
+ },
134
+ bio: {
135
+ fontSize: theme.typography.fontSize.md,
136
+ color: theme.colors.textSecondary,
137
+ textAlign: 'center',
138
+ lineHeight: 22,
139
+ },
140
+ statsContainer: {
141
+ flexDirection: 'row',
142
+ backgroundColor: theme.colors.surface,
143
+ marginHorizontal: theme.spacing.lg,
144
+ borderRadius: theme.borderRadius.md,
145
+ paddingVertical: theme.spacing.lg,
146
+ marginBottom: theme.spacing.lg,
147
+ },
148
+ statItem: {
149
+ flex: 1,
150
+ alignItems: 'center',
151
+ },
152
+ statNumber: {
153
+ fontSize: theme.typography.fontSize.xl,
154
+ fontWeight: theme.typography.fontWeight.bold,
155
+ color: theme.colors.text,
156
+ marginBottom: theme.spacing.xs,
157
+ },
158
+ statLabel: {
159
+ fontSize: theme.typography.fontSize.sm,
160
+ color: theme.colors.textSecondary,
161
+ },
162
+ statDivider: {
163
+ width: 1,
164
+ backgroundColor: theme.colors.border,
165
+ marginHorizontal: theme.spacing.md,
166
+ },
167
+ infoSection: {
168
+ paddingHorizontal: theme.spacing.lg,
169
+ marginBottom: theme.spacing.lg,
170
+ },
171
+ sectionTitle: {
172
+ fontSize: theme.typography.fontSize.lg,
173
+ fontWeight: theme.typography.fontWeight.semibold,
174
+ color: theme.colors.text,
175
+ marginBottom: theme.spacing.md,
176
+ },
177
+ infoItem: {
178
+ flexDirection: 'row',
179
+ justifyContent: 'space-between',
180
+ alignItems: 'center',
181
+ paddingVertical: theme.spacing.md,
182
+ borderBottomWidth: 1,
183
+ borderBottomColor: theme.colors.border,
184
+ },
185
+ infoLabel: {
186
+ fontSize: theme.typography.fontSize.md,
187
+ color: theme.colors.textSecondary,
188
+ },
189
+ infoValue: {
190
+ fontSize: theme.typography.fontSize.md,
191
+ color: theme.colors.text,
192
+ fontWeight: theme.typography.fontWeight.medium,
193
+ },
194
+ actionSection: {
195
+ paddingHorizontal: theme.spacing.lg,
196
+ paddingBottom: theme.spacing.xl,
197
+ gap: theme.spacing.md,
198
+ },
199
+ button: {
200
+ marginBottom: theme.spacing.sm,
201
+ },
202
+ });
@@ -0,0 +1,253 @@
1
+ import React, { useState } from 'react';
2
+ import { View, Text, StyleSheet, ScrollView, Switch, Alert } from 'react-native';
3
+ import { SafeAreaWrapper, Button, Icon, IconButton } from '../components/common';
4
+ import { IconAlt } from '../components/common/IconAlt';
5
+ import { SettingsScreenProps } from '../types';
6
+ import { theme } from '../constants';
7
+ import { useAuthStore } from '../stores/authStore';
8
+
9
+ export const SettingsScreen: React.FC<SettingsScreenProps> = ({ navigation }) => {
10
+ const [notificationsEnabled, setNotificationsEnabled] = useState(true);
11
+ const [darkModeEnabled, setDarkModeEnabled] = useState(false);
12
+ const [locationEnabled, setLocationEnabled] = useState(false);
13
+
14
+ const logout = useAuthStore((state) => state.logout);
15
+ const handleLogout = () => {
16
+ Alert.alert(
17
+ 'Logout',
18
+ 'Are you sure you want to logout?',
19
+ [
20
+ {
21
+ text: 'Cancel',
22
+ style: 'cancel',
23
+ },
24
+ {
25
+ text: 'Logout',
26
+ style: 'destructive',
27
+ onPress: async () => {
28
+ try {
29
+ logout();
30
+ } catch (error) {
31
+ Alert.alert('Error', 'Failed to logout. Please try again.');
32
+ }
33
+ },
34
+ },
35
+ ]
36
+ );
37
+ };
38
+
39
+ const handleClearCache = () => {
40
+ Alert.alert(
41
+ 'Clear Cache',
42
+ 'This will clear all cached data. Continue?',
43
+ [
44
+ {
45
+ text: 'Cancel',
46
+ style: 'cancel',
47
+ },
48
+ {
49
+ text: 'Clear',
50
+ style: 'destructive',
51
+ onPress: () => {
52
+ console.log('Cache cleared');
53
+ Alert.alert('Success', 'Cache cleared successfully!');
54
+ },
55
+ },
56
+ ]
57
+ );
58
+ };
59
+
60
+ const goBack = () => {
61
+ navigation.goBack();
62
+ };
63
+
64
+ const SettingItem: React.FC<{
65
+ title: string;
66
+ subtitle?: string;
67
+ value: boolean;
68
+ onValueChange: (value: boolean) => void;
69
+ }> = ({ title, subtitle, value, onValueChange }) => (
70
+ <View style={styles.settingItem}>
71
+ <View style={styles.settingTextContainer}>
72
+ <Text style={styles.settingTitle}>{title}</Text>
73
+ {subtitle && <Text style={styles.settingSubtitle}>{subtitle}</Text>}
74
+ </View>
75
+ <Switch
76
+ value={value}
77
+ onValueChange={onValueChange}
78
+ trackColor={{ false: theme.colors.border, true: theme.colors.primary }}
79
+ thumbColor={value ? theme.colors.background : theme.colors.textSecondary}
80
+ />
81
+ </View>
82
+ );
83
+
84
+ return (
85
+ <SafeAreaWrapper>
86
+ <ScrollView style={styles.container} showsVerticalScrollIndicator={false}>
87
+ <View style={styles.header}>
88
+ <Text style={styles.title}>Settings</Text>
89
+ <Text style={styles.subtitle}>Customize your app experience</Text>
90
+ </View>
91
+
92
+ <View style={styles.section}>
93
+ <Text style={styles.sectionTitle}>Preferences</Text>
94
+
95
+ <SettingItem
96
+ title="Push Notifications"
97
+ subtitle="Receive updates and alerts"
98
+ value={notificationsEnabled}
99
+ onValueChange={setNotificationsEnabled}
100
+ />
101
+
102
+ <SettingItem
103
+ title="Dark Mode"
104
+ subtitle="Switch to dark theme"
105
+ value={darkModeEnabled}
106
+ onValueChange={setDarkModeEnabled}
107
+ />
108
+
109
+ <SettingItem
110
+ title="Location Services"
111
+ subtitle="Allow location access"
112
+ value={locationEnabled}
113
+ onValueChange={setLocationEnabled}
114
+ />
115
+ </View>
116
+
117
+ <View style={styles.section}>
118
+ <Text style={styles.sectionTitle}>Account</Text>
119
+
120
+ <View style={styles.infoItem}>
121
+ <Text style={styles.infoLabel}>Version</Text>
122
+ <Text style={styles.infoValue}>1.0.0</Text>
123
+ </View>
124
+
125
+ <View style={styles.infoItem}>
126
+ <Text style={styles.infoLabel}>Build</Text>
127
+ <Text style={styles.infoValue}>2024.01.001</Text>
128
+ </View>
129
+ </View>
130
+
131
+ <View style={styles.actionSection}>
132
+ <Button
133
+ title="Clear Cache"
134
+ onPress={handleClearCache}
135
+ variant="secondary"
136
+ style={styles.button}
137
+ />
138
+
139
+ <View style={styles.logoutButtonContainer}>
140
+ <IconAlt name="log-out" size={20} color={theme.colors.error} />
141
+ <Button
142
+ title="Logout"
143
+ onPress={handleLogout}
144
+ variant="outline"
145
+ style={StyleSheet.flatten([styles.button, styles.logoutButton])}
146
+ />
147
+ </View>
148
+
149
+ <Button
150
+ title="Go Back"
151
+ onPress={goBack}
152
+ variant="primary"
153
+ style={styles.button}
154
+ />
155
+ </View>
156
+ </ScrollView>
157
+ </SafeAreaWrapper>
158
+ );
159
+ };
160
+
161
+ const styles = StyleSheet.create({
162
+ container: {
163
+ flex: 1,
164
+ backgroundColor: theme.colors.background,
165
+ },
166
+ header: {
167
+ alignItems: 'center',
168
+ paddingTop: theme.spacing.xl,
169
+ paddingHorizontal: theme.spacing.lg,
170
+ paddingBottom: theme.spacing.lg,
171
+ },
172
+ title: {
173
+ fontSize: theme.typography.fontSize.xxl,
174
+ fontWeight: theme.typography.fontWeight.bold,
175
+ color: theme.colors.text,
176
+ marginBottom: theme.spacing.xs,
177
+ },
178
+ subtitle: {
179
+ fontSize: theme.typography.fontSize.md,
180
+ color: theme.colors.textSecondary,
181
+ textAlign: 'center',
182
+ },
183
+ section: {
184
+ marginHorizontal: theme.spacing.lg,
185
+ marginBottom: theme.spacing.lg,
186
+ },
187
+ sectionTitle: {
188
+ fontSize: theme.typography.fontSize.lg,
189
+ fontWeight: theme.typography.fontWeight.semibold,
190
+ color: theme.colors.text,
191
+ marginBottom: theme.spacing.md,
192
+ },
193
+ settingItem: {
194
+ flexDirection: 'row',
195
+ alignItems: 'center',
196
+ justifyContent: 'space-between',
197
+ paddingVertical: theme.spacing.md,
198
+ paddingHorizontal: theme.spacing.md,
199
+ backgroundColor: theme.colors.surface,
200
+ borderRadius: theme.borderRadius.md,
201
+ marginBottom: theme.spacing.sm,
202
+ },
203
+ settingTextContainer: {
204
+ flex: 1,
205
+ marginRight: theme.spacing.md,
206
+ },
207
+ settingTitle: {
208
+ fontSize: theme.typography.fontSize.md,
209
+ fontWeight: theme.typography.fontWeight.medium,
210
+ color: theme.colors.text,
211
+ marginBottom: theme.spacing.xs,
212
+ },
213
+ settingSubtitle: {
214
+ fontSize: theme.typography.fontSize.sm,
215
+ color: theme.colors.textSecondary,
216
+ },
217
+ infoItem: {
218
+ flexDirection: 'row',
219
+ justifyContent: 'space-between',
220
+ alignItems: 'center',
221
+ paddingVertical: theme.spacing.md,
222
+ paddingHorizontal: theme.spacing.md,
223
+ backgroundColor: theme.colors.surface,
224
+ borderRadius: theme.borderRadius.md,
225
+ marginBottom: theme.spacing.sm,
226
+ },
227
+ infoLabel: {
228
+ fontSize: theme.typography.fontSize.md,
229
+ color: theme.colors.textSecondary,
230
+ },
231
+ infoValue: {
232
+ fontSize: theme.typography.fontSize.md,
233
+ color: theme.colors.text,
234
+ fontWeight: theme.typography.fontWeight.medium,
235
+ },
236
+ actionSection: {
237
+ paddingHorizontal: theme.spacing.lg,
238
+ paddingBottom: theme.spacing.xl,
239
+ gap: theme.spacing.md,
240
+ },
241
+ button: {
242
+ marginBottom: theme.spacing.sm,
243
+ },
244
+ logoutButtonContainer: {
245
+ flexDirection: 'row',
246
+ alignItems: 'center',
247
+ gap: theme.spacing.sm,
248
+ },
249
+ logoutButton: {
250
+ borderColor: theme.colors.error,
251
+ flex: 1,
252
+ },
253
+ });