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,183 @@
1
+ import React from 'react';
2
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
3
+ import { MainStackParamList } from '../types';
4
+ import {
5
+ HomeScreen,
6
+ ProfileScreen,
7
+ SettingsScreen,
8
+ DetailsScreen,
9
+ ClubDetailsScreen,
10
+ SportHubScreen,
11
+ MyTeamScreen,
12
+ MyTeamDetailsScreen,
13
+ JoinTeam,
14
+ ChatThreadsScreen,
15
+ ChatScreen,
16
+ ReportMessageScreen,
17
+ Announcements,
18
+ VolunteerOpportunitiesScreen,
19
+ RafflesScreen,
20
+ RaffleDetailsScreen,
21
+ BuyRaffleTicketsScreen,
22
+ VolunteerOpportunitiesDetailsScreen,
23
+ MyReferralMembersScreen,
24
+ SetReminderScreen,
25
+ SetRaffleReminderScreen,
26
+ EventScreen
27
+ } from '../screens';
28
+ import { PendingRequestsScreen } from '../screens/teams/PendingRequestsScreen';
29
+ import { JoinClubScreen } from '../screens/clubs/JoinClub';
30
+ import { theme } from '../constants/theme';
31
+
32
+ const Stack = createNativeStackNavigator<MainStackParamList>();
33
+
34
+ export const MainStack: React.FC = () => {
35
+ return (
36
+ <Stack.Navigator
37
+ id={undefined}
38
+ initialRouteName="Home"
39
+ screenOptions={{
40
+ headerShown: false,
41
+ headerStyle: {
42
+ backgroundColor: theme.colors.background,
43
+ },
44
+ headerTintColor: theme.colors.text,
45
+ headerTitleStyle: {
46
+ fontWeight: theme.typography.fontWeight.semibold,
47
+ fontSize: theme.typography.fontSize.lg,
48
+ },
49
+ headerBackTitle: '',
50
+ animation: 'fade',
51
+ headerShadowVisible: false,
52
+ }}
53
+ >
54
+ <Stack.Screen name="Home" component={HomeScreen} options={{ title: 'Club Yakka', headerLargeTitle: true }} />
55
+ <Stack.Screen name="Profile" component={ProfileScreen} options={{ title: 'Profile', headerBackTitle: 'Back' }} />
56
+ <Stack.Screen
57
+ name="Settings"
58
+ component={SettingsScreen}
59
+ options={{
60
+ title: 'Settings',
61
+ headerBackTitle: 'Back',
62
+ }}
63
+ />
64
+ <Stack.Screen
65
+ name="Details"
66
+ component={DetailsScreen}
67
+ options={({ route }) => ({
68
+ title: route.params?.title || 'Details',
69
+ headerBackTitle: 'Back',
70
+ })}
71
+ />
72
+ <Stack.Screen
73
+ name="JoinClub"
74
+ component={JoinClubScreen}
75
+ options={{
76
+ title: 'Join Club',
77
+ headerBackTitle: 'Back',
78
+ }}
79
+ />
80
+
81
+ <Stack.Screen
82
+ name="ClubDetails"
83
+ component={ClubDetailsScreen}
84
+ options={{
85
+ title: 'Club Details',
86
+ headerBackTitle: 'Back',
87
+ }}
88
+ />
89
+ <Stack.Screen
90
+ name="SportHub"
91
+ component={SportHubScreen}
92
+ options={{
93
+ title: 'MY SPORT HUB',
94
+ headerBackTitle: 'Back',
95
+ }}
96
+ />
97
+ <Stack.Screen
98
+ name="MyTeam"
99
+ component={MyTeamScreen}
100
+ />
101
+ <Stack.Screen
102
+ name="MyTeamDetails"
103
+ component={MyTeamDetailsScreen}
104
+ options={{
105
+ title: 'Team Details',
106
+ headerBackTitle: 'Back',
107
+ }}
108
+ />
109
+ <Stack.Screen
110
+ name="PendingRequests"
111
+ component={PendingRequestsScreen}
112
+ options={{
113
+ title: 'Pending Requests',
114
+ headerBackTitle: 'Back',
115
+ }}
116
+ />
117
+ <Stack.Screen
118
+ name="JoinTeam"
119
+ component={JoinTeam}
120
+ />
121
+
122
+ <Stack.Screen
123
+ name="ChatThreads"
124
+ component={ChatThreadsScreen}
125
+ />
126
+ <Stack.Screen
127
+ name="ChatScreen"
128
+ component={ChatScreen}
129
+ />
130
+ <Stack.Screen
131
+ name="ReportMessage"
132
+ component={ReportMessageScreen}
133
+ options={{
134
+ presentation: 'transparentModal',
135
+ headerShown: false,
136
+ animation: 'fade',
137
+ }}
138
+ />
139
+ <Stack.Screen
140
+ name="Announcements"
141
+ component={Announcements}
142
+ />
143
+ <Stack.Screen
144
+ name="VolunteerOpportunitiesScreen"
145
+ component={VolunteerOpportunitiesScreen}
146
+ />
147
+ <Stack.Screen
148
+ name="VolunteerOpportunitiesDetailsScreen"
149
+ component={VolunteerOpportunitiesDetailsScreen}
150
+ />
151
+ <Stack.Screen
152
+ name="Raffles"
153
+ component={RafflesScreen}
154
+ />
155
+ <Stack.Screen
156
+ name="RaffleDetails"
157
+ component={RaffleDetailsScreen}
158
+ />
159
+ <Stack.Screen
160
+ name="BuyRaffleTickets"
161
+ component={BuyRaffleTicketsScreen}
162
+ />
163
+ <Stack.Screen
164
+ name="MyReferralMembers"
165
+ component={MyReferralMembersScreen}
166
+ />
167
+ <Stack.Screen
168
+ name="SetReminder"
169
+ component={SetReminderScreen}
170
+ />
171
+ <Stack.Screen
172
+ name="SetRaffleReminder"
173
+ component={SetRaffleReminderScreen}
174
+ />
175
+
176
+
177
+ <Stack.Screen
178
+ name="EventScreen"
179
+ component={EventScreen}
180
+ />
181
+ </Stack.Navigator>
182
+ );
183
+ };
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
3
+ import { MiddleStackParamList } from '../types';
4
+ import { AddMemberScreen } from '../screens/auth';
5
+ import { theme } from '../constants';
6
+
7
+ const Stack = createNativeStackNavigator<MiddleStackParamList>();
8
+
9
+ export const MiddleStack: React.FC = () => {
10
+ return (
11
+ <Stack.Navigator
12
+ id={undefined}
13
+ initialRouteName="AddMember"
14
+ screenOptions={{
15
+ headerShown: false,
16
+ headerStyle: {
17
+ backgroundColor: theme.colors.background,
18
+ },
19
+ headerTintColor: theme.colors.text,
20
+ headerTitleStyle: {
21
+ fontWeight: theme.typography.fontWeight.semibold,
22
+ fontSize: theme.typography.fontSize.lg,
23
+ },
24
+ headerBackTitle: '',
25
+ animation: 'fade',
26
+ headerShadowVisible: false,
27
+ }}
28
+ >
29
+ <Stack.Screen
30
+ name="AddMember"
31
+ component={AddMemberScreen}
32
+ />
33
+ </Stack.Navigator>
34
+ );
35
+ };
@@ -0,0 +1,101 @@
1
+ import React, { useEffect } from 'react';
2
+ import { NavigationContainer } from '@react-navigation/native';
3
+ import { useAuthStore } from '../stores/authStore';
4
+ import { AuthStack } from './AuthStack';
5
+ import { MiddleStack } from './MiddleStack';
6
+ import { MainStack } from './MainStack';
7
+ import { LoadingSpinner } from '../components/common';
8
+ import * as SplashScreen from 'expo-splash-screen';
9
+ import { navigationRef } from './navigationRef';
10
+ import NotificationManager from '../utils/NotificationManager';
11
+
12
+ // Navigation component that switches between Auth, Middle and Main stacks
13
+ const AppNavigator: React.FC = () => {
14
+ const isLoading = useAuthStore((state) => state.isLoading);
15
+ const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
16
+ const user = useAuthStore((state) => state.user);
17
+
18
+ if (isLoading) {
19
+ return <LoadingSpinner />;
20
+ }
21
+
22
+ if (!isAuthenticated) {
23
+ return <AuthStack />;
24
+ }
25
+
26
+ // If user is authenticated but needs to add member, show MiddleStack
27
+ if (user?.isAddMember) {
28
+ return <MiddleStack />;
29
+ }
30
+
31
+ // Otherwise show MainStack
32
+ return <MainStack />;
33
+ };
34
+
35
+ // Root Navigator
36
+ export const RootNavigator: React.FC = () => {
37
+ useEffect(() => {
38
+ const initializeFCM = async () => {
39
+ try {
40
+ // Initialize notification manager (this handles initial notifications from killed state)
41
+ await NotificationManager.initialize();
42
+
43
+ // Set up foreground event listener (when app is active)
44
+ NotificationManager.setForegroundEventListener((type, detail) => {
45
+ console.log("Foreground notification event:", type, detail);
46
+ // The navigation handling is now done inside NotificationManager
47
+ });
48
+
49
+ // Set up background event listener (when app is backgrounded)
50
+ NotificationManager.setBackgroundEventListener((type, detail) => {
51
+ console.log("Background notification event:", type, detail);
52
+ // The navigation handling is now done inside NotificationManager
53
+ });
54
+
55
+ // Handle initial notification for Android (when app is launched from notification)
56
+ NotificationManager.setInitialNotificationAndroidEvent(
57
+ ({ notification, pressAction }) => {
58
+ // The navigation handling is now done inside NotificationManager
59
+ }
60
+ );
61
+ } catch (error) {
62
+ console.error("Error initializing FCM:", error);
63
+ }
64
+ };
65
+
66
+ initializeFCM();
67
+
68
+ return () => {
69
+ NotificationManager.removeListeners();
70
+ };
71
+ }, []);
72
+
73
+ // When authentication state changes to a stack that contains the target routes,
74
+ // attempt any pending navigation that may have been queued from a notification.
75
+ const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
76
+ const user = useAuthStore((state) => state.user);
77
+ useEffect(() => {
78
+ // Only try when we are in the main app (not auth / middle stack)
79
+ if (isAuthenticated && !user?.isAddMember) {
80
+ // Small delay to ensure navigator screens are mounted
81
+ const id = setTimeout(() => {
82
+ NotificationManager.executePendingNavigation();
83
+ }, 100);
84
+ return () => clearTimeout(id);
85
+ }
86
+ }, [isAuthenticated, user?.isAddMember]);
87
+
88
+ return (
89
+ <NavigationContainer
90
+ ref={navigationRef}
91
+ onReady={() => {
92
+ setTimeout(() => {
93
+ SplashScreen.hide();
94
+ }, 300);
95
+ // Process any pending navigation queued from a notification
96
+ NotificationManager.executePendingNavigation();
97
+ }}>
98
+ <AppNavigator />
99
+ </NavigationContainer>
100
+ );
101
+ };
@@ -0,0 +1,5 @@
1
+ export * from './RootNavigator';
2
+ export * from './AuthStack';
3
+ export * from './MiddleStack';
4
+ export * from './MainStack';
5
+ export * from './navigationRef';
@@ -0,0 +1,5 @@
1
+ import { createNavigationContainerRef } from '@react-navigation/native';
2
+ import { RootStackParamList } from '../types/navigation';
3
+
4
+ // Create navigation reference
5
+ export const navigationRef = createNavigationContainerRef<RootStackParamList>();
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
3
+
4
+ // Create a client
5
+ const queryClient = new QueryClient({
6
+ defaultOptions: {
7
+ queries: {
8
+ retry: 2,
9
+ staleTime: 5 * 60 * 1000, // 5 minutes
10
+ gcTime: 5 * 60 * 1000, // 10 minutes (formerly cacheTime)
11
+ },
12
+ mutations: {
13
+ retry: 1,
14
+ },
15
+ },
16
+ });
17
+
18
+ interface QueryProviderProps {
19
+ children: React.ReactNode;
20
+ }
21
+
22
+ export const QueryProvider: React.FC<QueryProviderProps> = ({ children }) => {
23
+ return (
24
+ <QueryClientProvider client={queryClient}>
25
+ {children}
26
+ </QueryClientProvider>
27
+ );
28
+ };
29
+
30
+ export { queryClient };
@@ -0,0 +1,271 @@
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet, ScrollView, Image } from 'react-native';
3
+ import { SafeAreaWrapper, Button } from '../components/common';
4
+ import { DetailsScreenProps } from '../types';
5
+ import { theme } from '../constants';
6
+ import { formatDateTime } from '../utils';
7
+
8
+ export const DetailsScreen: React.FC<DetailsScreenProps> = ({ route, navigation }) => {
9
+ const { itemId, title } = route.params;
10
+
11
+ // Mock item data - in a real app, you'd fetch this based on itemId
12
+ const itemData = {
13
+ id: itemId,
14
+ title: title || 'Sample Item',
15
+ description: 'This is a detailed description of the item. It contains comprehensive information about the features, specifications, and other relevant details that users might want to know.',
16
+ image: 'https://via.placeholder.com/300x200/007AFF/FFFFFF?text=Item+Image',
17
+ category: 'Electronics',
18
+ price: '$299.99',
19
+ rating: 4.5,
20
+ reviews: 128,
21
+ inStock: true,
22
+ createdAt: new Date('2024-01-10T10:30:00Z'),
23
+ updatedAt: new Date('2024-01-15T14:45:00Z'),
24
+ tags: ['Popular', 'Featured', 'New Arrival'],
25
+ };
26
+
27
+ const goBack = () => {
28
+ navigation.goBack();
29
+ };
30
+
31
+ const handlePurchase = () => {
32
+ // Handle purchase logic
33
+ console.log('Purchase item:', itemId);
34
+ };
35
+
36
+ const handleAddToCart = () => {
37
+ // Handle add to cart logic
38
+ console.log('Add to cart:', itemId);
39
+ };
40
+
41
+ const renderStars = (rating: number) => {
42
+ const stars = [];
43
+ const fullStars = Math.floor(rating);
44
+ const hasHalfStar = rating % 1 !== 0;
45
+
46
+ for (let i = 0; i < fullStars; i++) {
47
+ stars.push('⭐');
48
+ }
49
+ if (hasHalfStar) {
50
+ stars.push('✨');
51
+ }
52
+ return stars.join('');
53
+ };
54
+
55
+ return (
56
+ <SafeAreaWrapper>
57
+ <ScrollView style={styles.container} showsVerticalScrollIndicator={false}>
58
+ <View style={styles.imageContainer}>
59
+ <Image
60
+ source={{ uri: itemData.image }}
61
+ style={styles.image}
62
+ resizeMode="cover"
63
+ />
64
+ <View style={styles.statusBadge}>
65
+ <Text style={styles.statusText}>
66
+ {itemData.inStock ? 'In Stock' : 'Out of Stock'}
67
+ </Text>
68
+ </View>
69
+ </View>
70
+
71
+ <View style={styles.content}>
72
+ <View style={styles.header}>
73
+ <Text style={styles.title}>{itemData.title}</Text>
74
+ <Text style={styles.price}>{itemData.price}</Text>
75
+ </View>
76
+
77
+ <View style={styles.ratingContainer}>
78
+ <Text style={styles.rating}>
79
+ {renderStars(itemData.rating)} {itemData.rating}
80
+ </Text>
81
+ <Text style={styles.reviews}>({itemData.reviews} reviews)</Text>
82
+ </View>
83
+
84
+ <View style={styles.tagsContainer}>
85
+ {itemData.tags.map((tag, index) => (
86
+ <View key={`tag-${tag}-${index}`} style={styles.tag}>
87
+ <Text style={styles.tagText}>{tag}</Text>
88
+ </View>
89
+ ))}
90
+ </View>
91
+
92
+ <View style={styles.section}>
93
+ <Text style={styles.sectionTitle}>Description</Text>
94
+ <Text style={styles.description}>{itemData.description}</Text>
95
+ </View>
96
+
97
+ <View style={styles.section}>
98
+ <Text style={styles.sectionTitle}>Details</Text>
99
+
100
+ <View style={styles.detailItem}>
101
+ <Text style={styles.detailLabel}>Item ID</Text>
102
+ <Text style={styles.detailValue}>{itemData.id}</Text>
103
+ </View>
104
+
105
+ <View style={styles.detailItem}>
106
+ <Text style={styles.detailLabel}>Category</Text>
107
+ <Text style={styles.detailValue}>{itemData.category}</Text>
108
+ </View>
109
+
110
+ <View style={styles.detailItem}>
111
+ <Text style={styles.detailLabel}>Created</Text>
112
+ <Text style={styles.detailValue}>{formatDateTime(itemData.createdAt)}</Text>
113
+ </View>
114
+
115
+ <View style={styles.detailItem}>
116
+ <Text style={styles.detailLabel}>Last Updated</Text>
117
+ <Text style={styles.detailValue}>{formatDateTime(itemData.updatedAt)}</Text>
118
+ </View>
119
+ </View>
120
+
121
+ <View style={styles.actionSection}>
122
+ {itemData.inStock && (
123
+ <>
124
+ <Button
125
+ title="Purchase Now"
126
+ onPress={handlePurchase}
127
+ variant="primary"
128
+ style={styles.button}
129
+ />
130
+
131
+ <Button
132
+ title="Add to Cart"
133
+ onPress={handleAddToCart}
134
+ variant="secondary"
135
+ style={styles.button}
136
+ />
137
+ </>
138
+ )}
139
+
140
+ <Button
141
+ title="Go Back"
142
+ onPress={goBack}
143
+ variant="outline"
144
+ style={styles.button}
145
+ />
146
+ </View>
147
+ </View>
148
+ </ScrollView>
149
+ </SafeAreaWrapper>
150
+ );
151
+ };
152
+
153
+ const styles = StyleSheet.create({
154
+ container: {
155
+ flex: 1,
156
+ backgroundColor: theme.colors.background,
157
+ },
158
+ imageContainer: {
159
+ position: 'relative',
160
+ height: 250,
161
+ backgroundColor: theme.colors.surface,
162
+ },
163
+ image: {
164
+ width: '100%',
165
+ height: '100%',
166
+ },
167
+ statusBadge: {
168
+ position: 'absolute',
169
+ top: theme.spacing.md,
170
+ right: theme.spacing.md,
171
+ backgroundColor: theme.colors.success,
172
+ paddingHorizontal: theme.spacing.sm,
173
+ paddingVertical: theme.spacing.xs,
174
+ borderRadius: theme.borderRadius.md,
175
+ },
176
+ statusText: {
177
+ color: theme.colors.background,
178
+ fontSize: theme.typography.fontSize.sm,
179
+ fontWeight: theme.typography.fontWeight.medium,
180
+ },
181
+ content: {
182
+ padding: theme.spacing.lg,
183
+ },
184
+ header: {
185
+ flexDirection: 'row',
186
+ justifyContent: 'space-between',
187
+ alignItems: 'flex-start',
188
+ marginBottom: theme.spacing.md,
189
+ },
190
+ title: {
191
+ flex: 1,
192
+ fontSize: theme.typography.fontSize.xl,
193
+ fontWeight: theme.typography.fontWeight.bold,
194
+ color: theme.colors.text,
195
+ marginRight: theme.spacing.md,
196
+ },
197
+ price: {
198
+ fontSize: theme.typography.fontSize.xl,
199
+ fontWeight: theme.typography.fontWeight.bold,
200
+ color: theme.colors.primary,
201
+ },
202
+ ratingContainer: {
203
+ flexDirection: 'row',
204
+ alignItems: 'center',
205
+ marginBottom: theme.spacing.md,
206
+ },
207
+ rating: {
208
+ fontSize: theme.typography.fontSize.md,
209
+ color: theme.colors.text,
210
+ marginRight: theme.spacing.sm,
211
+ },
212
+ reviews: {
213
+ fontSize: theme.typography.fontSize.sm,
214
+ color: theme.colors.textSecondary,
215
+ },
216
+ tagsContainer: {
217
+ flexDirection: 'row',
218
+ flexWrap: 'wrap',
219
+ marginBottom: theme.spacing.lg,
220
+ gap: theme.spacing.sm,
221
+ },
222
+ tag: {
223
+ backgroundColor: theme.colors.primary,
224
+ paddingHorizontal: theme.spacing.sm,
225
+ paddingVertical: theme.spacing.xs,
226
+ borderRadius: theme.borderRadius.sm,
227
+ },
228
+ tagText: {
229
+ color: theme.colors.background,
230
+ fontSize: theme.typography.fontSize.sm,
231
+ fontWeight: theme.typography.fontWeight.medium,
232
+ },
233
+ section: {
234
+ marginBottom: theme.spacing.lg,
235
+ },
236
+ sectionTitle: {
237
+ fontSize: theme.typography.fontSize.lg,
238
+ fontWeight: theme.typography.fontWeight.semibold,
239
+ color: theme.colors.text,
240
+ marginBottom: theme.spacing.md,
241
+ },
242
+ description: {
243
+ fontSize: theme.typography.fontSize.md,
244
+ color: theme.colors.textSecondary,
245
+ lineHeight: 22,
246
+ },
247
+ detailItem: {
248
+ flexDirection: 'row',
249
+ justifyContent: 'space-between',
250
+ alignItems: 'center',
251
+ paddingVertical: theme.spacing.sm,
252
+ borderBottomWidth: 1,
253
+ borderBottomColor: theme.colors.border,
254
+ },
255
+ detailLabel: {
256
+ fontSize: theme.typography.fontSize.md,
257
+ color: theme.colors.textSecondary,
258
+ },
259
+ detailValue: {
260
+ fontSize: theme.typography.fontSize.md,
261
+ color: theme.colors.text,
262
+ fontWeight: theme.typography.fontWeight.medium,
263
+ },
264
+ actionSection: {
265
+ gap: theme.spacing.md,
266
+ marginTop: theme.spacing.lg,
267
+ },
268
+ button: {
269
+ marginBottom: theme.spacing.sm,
270
+ },
271
+ });