create-gufran-expo-app 2.0.0 → 2.0.1

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,762 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ StyleSheet,
6
+ StatusBar,
7
+ Platform,
8
+ TouchableOpacity,
9
+ ScrollView,
10
+ Image,
11
+ ActivityIndicator,
12
+ Modal,
13
+ useWindowDimensions,
14
+ Alert,
15
+ Linking,
16
+ } from 'react-native';
17
+ import { SafeAreaView } from 'react-native-safe-area-context';
18
+ import RenderHtml from 'react-native-render-html';
19
+ import { theme } from '../../constants';
20
+ import { moderateScale } from '../../utils/scaling';
21
+ import { Fonts } from '../../constants/Fonts';
22
+ import SVG from '../../assets/icons';
23
+ import { NativeStackScreenProps } from '@react-navigation/native-stack';
24
+ import { MainStackParamList } from '@navigation';
25
+ import { useRaffleDetails } from '../../services/mainServices';
26
+ import { Button } from '../../components/common';
27
+ import { useFocusEffect } from '@react-navigation/native';
28
+
29
+ type RaffleDetailsScreenProps = NativeStackScreenProps<MainStackParamList, 'RaffleDetails'>;
30
+
31
+ export const RaffleDetailsScreen: React.FC<RaffleDetailsScreenProps> = ({ navigation, route }) => {
32
+ const { selectedClub, selectedMember, raffleId } = route.params;
33
+
34
+ // Fetch raffle details from API
35
+ const { data: raffleResponse, isLoading, isError, error, refetch } = useRaffleDetails(raffleId);
36
+
37
+ useFocusEffect(
38
+ React.useCallback(() => {
39
+ refetch();
40
+ }, [])
41
+ );
42
+
43
+
44
+ // Get direct API data
45
+ const raffleData = raffleResponse?.data?.data;
46
+
47
+ // Modal state for description
48
+ const [isDescriptionModalVisible, setIsDescriptionModalVisible] = useState(false);
49
+
50
+ // Get window dimensions for HTML rendering
51
+ const { width } = useWindowDimensions();
52
+
53
+ // Loading state
54
+ if (isLoading) {
55
+ return (
56
+ <View style={[styles.container, { justifyContent: 'center', alignItems: 'center' }]}>
57
+ <StatusBar barStyle="light-content" backgroundColor={theme.colors.blue} />
58
+ <ActivityIndicator size="large" color={theme.colors.blue} />
59
+ </View>
60
+ );
61
+ }
62
+
63
+ // Error state
64
+ if (isError) {
65
+ return (
66
+ <View style={[styles.container, { justifyContent: 'center', alignItems: 'center', padding: theme.spacing.lg }]}>
67
+ <StatusBar barStyle="light-content" backgroundColor={theme.colors.blue} />
68
+ <Text style={styles.title}>Failed to load raffle details</Text>
69
+ <TouchableOpacity
70
+ style={[styles.buyButton, { marginTop: theme.spacing.md }]}
71
+ onPress={() => navigation.goBack()}
72
+ >
73
+ <Text style={styles.buyButtonText}>Go Back</Text>
74
+ </TouchableOpacity>
75
+ </View>
76
+ );
77
+ }
78
+
79
+ // Helper to format amount
80
+ const formatAmount = (amount: number) => {
81
+ return amount > 0 ? `$${amount.toLocaleString()}` : '$0';
82
+ };
83
+
84
+ // Helper to get ordinal suffix
85
+ const getOrdinalSuffix = (rank: number) => {
86
+ const lastDigit = rank % 10;
87
+ const lastTwoDigits = rank % 100;
88
+
89
+ if (lastTwoDigits >= 11 && lastTwoDigits <= 13) {
90
+ return 'th';
91
+ }
92
+
93
+ switch (lastDigit) {
94
+ case 1:
95
+ return ' st';
96
+ case 2:
97
+ return ' nd';
98
+ case 3:
99
+ return ' rd';
100
+ default:
101
+ return ' th';
102
+ }
103
+ };
104
+
105
+
106
+ const handleOpenMap = (lat: number | undefined, lng: number | undefined, label: string) => {
107
+ if (lat && lng && lat !== 0 && lng !== 0) {
108
+ const scheme = Platform.select({ ios: 'maps:0,0?q=', android: 'geo:0,0?q=' });
109
+ const latLng = `${lat},${lng}`;
110
+ const url = Platform.select({
111
+ ios: `${scheme}${label}@${latLng}`,
112
+ android: `${scheme}${latLng}(${label})`
113
+ });
114
+ if (url) {
115
+ Linking.openURL(url);
116
+ }
117
+ }
118
+ };
119
+
120
+
121
+ return (
122
+ <View style={styles.container}>
123
+ <StatusBar
124
+ barStyle="light-content"
125
+ backgroundColor={theme.colors.blue}
126
+ translucent={Platform.OS === 'android'}
127
+ />
128
+ {Platform.OS === 'ios' && <View style={styles.statusBarBackground} />}
129
+
130
+ <SafeAreaView style={styles.header}>
131
+ <View style={{ flexDirection: 'row', paddingHorizontal: theme.spacing.lg }}>
132
+ <TouchableOpacity onPress={() => navigation.goBack()}>
133
+ <SVG.arrowLeft_white width={moderateScale(25)} height={moderateScale(25)} />
134
+ </TouchableOpacity>
135
+ <View style={{ flexDirection: 'row' }}>
136
+ <View style={styles.userConSty}>
137
+ {!!selectedClub?.clubImage ? (
138
+ <Image
139
+ source={{ uri: selectedClub?.clubImage }}
140
+ resizeMode='cover'
141
+ style={styles.userDetailsSty}
142
+ />
143
+ ) : (
144
+ <View style={styles.placeholderLogoHeader}>
145
+ <SVG.UsersIcon width={moderateScale(20)} height={moderateScale(20)} />
146
+ </View>
147
+ )}
148
+ </View>
149
+ <Text style={styles.userNameSty}>{selectedClub?.clubName || 'Club'}</Text>
150
+ </View>
151
+ </View>
152
+
153
+ <View style={styles.content}>
154
+ <ScrollView
155
+ showsVerticalScrollIndicator={false}
156
+ contentContainerStyle={styles.scrollContent}
157
+ >
158
+ {/* Banner Image */}
159
+ {raffleData.bannerImageUrl && (
160
+ <View style={styles.imageContainer}>
161
+ <Image
162
+ source={{ uri: raffleData.bannerImageUrl }}
163
+ style={styles.raffleImage}
164
+ />
165
+ </View>
166
+ )}
167
+
168
+ <View style={styles.mainContent}>
169
+ {/* Title */}
170
+ <Text numberOfLines={2} style={styles.title}>{raffleData.raffleTitle}</Text>
171
+
172
+ {/* Purchase End Date */}
173
+ <Text style={styles.dateRange}>End Date: {raffleData.purchaseEndDate}</Text>
174
+
175
+ {/* Buy Tickets Button */}
176
+
177
+ {/* Prize Pool */}
178
+ <View style={{ backgroundColor: theme.colors.lightLavenderGray, alignItems: 'center', paddingVertical: moderateScale(20), paddingHorizontal: moderateScale(10), borderRadius: moderateScale(10), marginBottom: moderateScale(20) }}>
179
+
180
+ <View style={styles.prizePoolContainer}>
181
+ <Text style={styles.prizePoolLabel}>Prize Pool: <Text style={styles.prizeAmount}>${raffleData.totalPricePoolAmount}</Text></Text>
182
+
183
+ </View>
184
+
185
+ {/* Draw Date */}
186
+ <View style={styles.drawDateContainer}>
187
+ <Text style={styles.drawDate}>
188
+ Draw Date: {raffleData?.drawDate}{raffleData?.drawTime && ` ${raffleData?.drawTime}`}
189
+ </Text>
190
+ </View>
191
+ </View>
192
+
193
+ {/* View Description Button - Opens modal with HTML description */}
194
+ {raffleData.description && (
195
+ <Button
196
+ title="View Details"
197
+ onPress={() => setIsDescriptionModalVisible(true)}
198
+ variant='outline'
199
+ size='small'
200
+ style={{ marginBottom: moderateScale(16), borderColor: theme.colors.blue, borderWidth: 1 }}
201
+ textStyle={{ fontFamily: Fonts.outfitBold, fontSize: moderateScale(16), color: theme.colors.blue }}
202
+ />
203
+ )}
204
+
205
+ {/* Terms & Conditions */}
206
+ {raffleData?.termsAndConditionFileUrl && (
207
+ <TouchableOpacity
208
+ style={styles.termsButton}
209
+ onPress={async () => {
210
+ try {
211
+ const url = raffleData.termsAndConditionFileUrl;
212
+ const supported = await Linking.canOpenURL(url);
213
+
214
+ if (supported) {
215
+ await Linking.openURL(url);
216
+ } else {
217
+ Alert.alert(
218
+ 'Error',
219
+ 'Unable to open the document URL.',
220
+ [{ text: 'OK' }]
221
+ );
222
+ }
223
+ } catch (error) {
224
+ console.error('Error opening document:', error);
225
+ Alert.alert(
226
+ 'Error',
227
+ 'Unable to open the document. Please try again later.',
228
+ [{ text: 'OK' }]
229
+ );
230
+ }
231
+ }}
232
+ >
233
+ <SVG.PDFAppleGreen width={moderateScale(20)} height={moderateScale(20)} />
234
+ <Text style={styles.termsButtonText}>Terms & Conditions</Text>
235
+ <SVG.DownloadBlue width={moderateScale(20)} height={moderateScale(20)} />
236
+ </TouchableOpacity>
237
+ )}
238
+
239
+ {/* The Draw Section */}
240
+ <View style={styles.section}>
241
+ <Text style={styles.sectionTitle}>The Draw</Text>
242
+
243
+ <View style={styles.infoRow}>
244
+ <View style={styles.infoRowIconBG}>
245
+ <SVG.CalendarBlue width={moderateScale(25)} height={moderateScale(25)} />
246
+ </View>
247
+ <View style={styles.infoTextContainer}>
248
+ <Text style={styles.infoLabel}>Date</Text>
249
+ <Text style={styles.infoValue}>{raffleData.drawDate}</Text>
250
+ </View>
251
+ </View>
252
+
253
+ {raffleData.drawTime && (
254
+ <View style={styles.infoRow}>
255
+ <View style={styles.infoRowIconBG}>
256
+ <SVG.Clock_Blue width={moderateScale(25)} height={moderateScale(25)} />
257
+ </View>
258
+ <View style={styles.infoTextContainer}>
259
+ <Text style={styles.infoLabel}>Time</Text>
260
+ <Text style={styles.infoValue}>{raffleData.drawTime}</Text>
261
+ </View>
262
+ </View>
263
+ )}
264
+
265
+ {raffleData.locationAddress && (
266
+ <TouchableOpacity style={styles.infoRow}
267
+ onPress={() => handleOpenMap(raffleData.latitude, raffleData.longitude, raffleData.locationAddress)}
268
+ >
269
+ <View style={styles.infoRowIconBG}>
270
+ <SVG.locationBlue width={moderateScale(25)} height={moderateScale(25)} />
271
+ </View>
272
+ <View style={styles.infoTextContainer}>
273
+ <Text style={styles.infoLabel}>Location</Text>
274
+ <Text style={styles.infoValue}>{raffleData.locationAddress}</Text>
275
+ </View>
276
+ </TouchableOpacity>
277
+ )}
278
+ </View>
279
+
280
+ {/* Set Reminders */}
281
+ <Button
282
+ title="Manage Reminders"
283
+ onPress={() => {
284
+ navigation.navigate('SetRaffleReminder', {
285
+ selectedClub,
286
+ selectedMember,
287
+ raffle: raffleData,
288
+ });
289
+ }}
290
+ variant='outline'
291
+ size='small'
292
+ style={{ marginBottom: moderateScale(20), borderColor: theme.colors.blue, borderWidth: 1 }}
293
+ textStyle={{ fontFamily: Fonts.outfitBold, fontSize: moderateScale(16), color: theme.colors.blue }}
294
+ />
295
+
296
+ {/* Prizes Section */}
297
+ {raffleData.pricePools && raffleData.pricePools.length > 0 && (
298
+ <View style={styles.section}>
299
+ <Text style={styles.sectionTitle}>The Prize</Text>
300
+ <View style={styles.prizesContainer}>
301
+ {raffleData?.pricePools.map((prize, index) => (
302
+ <View key={prize.id} style={styles.prizeCard}>
303
+ <View style={{
304
+ marginRight: moderateScale(12),
305
+ alignItems: 'center',
306
+ justifyContent: 'center',
307
+ width: moderateScale(55),
308
+ height: moderateScale(55),
309
+ borderRadius: moderateScale(28.5),
310
+ backgroundColor: theme.colors.white,
311
+ borderWidth: 1.5,
312
+ borderColor: theme.colors.lightLavenderGray,
313
+ }}>
314
+ <Text style={styles.prizePosition}>{prize?.prizeRank}{getOrdinalSuffix(prize?.prizeRank)}</Text>
315
+ <Text style={styles.prizeText}>PRIZE</Text>
316
+ </View>
317
+
318
+ <View style={{ flex: 1, backgroundColor: theme.colors.lightLavenderGray, borderRadius: moderateScale(8), }}>
319
+
320
+ {prize?.bannerImageUrl && (
321
+ <Image
322
+ source={{ uri: prize?.bannerImageUrl }}
323
+ style={styles.prizeImage}
324
+ />
325
+ )}
326
+ <View style={{ padding: moderateScale(8) }}>
327
+ <Text numberOfLines={5} style={styles.prizeTitle}>{prize?.title} (${prize?.prizeAmount})</Text>
328
+ <Text style={styles.prizeAmountText}>{prize?.description}</Text>
329
+ </View>
330
+ </View>
331
+ </View>
332
+ ))}
333
+ </View>
334
+ </View>
335
+ )}
336
+ </View>
337
+ </ScrollView>
338
+ </View>
339
+ </SafeAreaView>
340
+
341
+ {/* Description Modal */}
342
+ <Modal
343
+ visible={isDescriptionModalVisible}
344
+ animationType="fade"
345
+ transparent={true}
346
+ onRequestClose={() => setIsDescriptionModalVisible(false)}
347
+ >
348
+ <View style={styles.modalOverlay}>
349
+ <TouchableOpacity
350
+ style={styles.modalBackdrop}
351
+ activeOpacity={1}
352
+ onPress={() => setIsDescriptionModalVisible(false)}
353
+ />
354
+ <View style={styles.modalContainer}>
355
+ {/* Drag Handle */}
356
+ <View style={styles.dragHandle} />
357
+
358
+ {/* Modal Header */}
359
+ <View style={styles.modalHeader}>
360
+ <Text style={styles.modalTitle}>Raffle Description</Text>
361
+ <TouchableOpacity
362
+ onPress={() => setIsDescriptionModalVisible(false)}
363
+ style={styles.closeButton}
364
+ >
365
+ <Text style={styles.closeButtonText}>✕</Text>
366
+ </TouchableOpacity>
367
+ </View>
368
+
369
+ {/* HTML Content with ScrollView */}
370
+ <ScrollView
371
+ style={styles.modalScrollView}
372
+ showsVerticalScrollIndicator={false}
373
+ >
374
+ {raffleData?.description ? (
375
+ <RenderHtml
376
+ contentWidth={width - moderateScale(80)}
377
+ source={{ html: raffleData.description }}
378
+ tagsStyles={{
379
+ body: {
380
+ fontFamily: Fonts.outfitRegular,
381
+ fontSize: moderateScale(14),
382
+ color: theme.colors.text,
383
+ lineHeight: moderateScale(22),
384
+ },
385
+ p: {
386
+ marginBottom: moderateScale(12),
387
+ },
388
+ h1: {
389
+ fontFamily: Fonts.outfitBold,
390
+ fontSize: moderateScale(20),
391
+ color: theme.colors.text,
392
+ marginBottom: moderateScale(12),
393
+ },
394
+ h2: {
395
+ fontFamily: Fonts.outfitBold,
396
+ fontSize: moderateScale(18),
397
+ color: theme.colors.text,
398
+ marginBottom: moderateScale(10),
399
+ },
400
+ h3: {
401
+ fontFamily: Fonts.outfitSemiBold,
402
+ fontSize: moderateScale(16),
403
+ color: theme.colors.text,
404
+ marginBottom: moderateScale(8),
405
+ },
406
+ strong: {
407
+ fontFamily: Fonts.outfitBold,
408
+ },
409
+ em: {
410
+ fontFamily: Fonts.outfitRegular,
411
+ fontStyle: 'italic',
412
+ },
413
+ u: {
414
+ textDecorationLine: 'underline',
415
+ textDecorationStyle: 'solid',
416
+ },
417
+ s: {
418
+ textDecorationLine: 'line-through',
419
+ textDecorationStyle: 'solid',
420
+ },
421
+ ul: {
422
+ marginBottom: moderateScale(12),
423
+ },
424
+ ol: {
425
+ marginBottom: moderateScale(12),
426
+ },
427
+ li: {
428
+ marginBottom: moderateScale(6),
429
+ },
430
+ }}
431
+ />
432
+ ) : (
433
+ <Text style={styles.noDescriptionText}>No description available</Text>
434
+ )}
435
+ </ScrollView>
436
+ </View>
437
+ </View>
438
+ </Modal>
439
+ </View>
440
+ );
441
+ };
442
+
443
+ const styles = StyleSheet.create({
444
+ container: {
445
+ flex: 1,
446
+ backgroundColor: theme.colors.blue,
447
+ },
448
+ statusBarBackground: {
449
+ position: 'absolute',
450
+ top: 0,
451
+ left: 0,
452
+ right: 0,
453
+ height: Platform.OS === 'ios' ? 44 : 0,
454
+ backgroundColor: theme.colors.blue,
455
+ zIndex: 1000,
456
+ },
457
+ header: {
458
+ flex: 1,
459
+ backgroundColor: theme.colors.blue,
460
+ paddingVertical: theme.spacing.xs,
461
+ paddingTop: Platform.OS === 'android' ? theme.spacing.lg : theme.spacing.xs,
462
+ },
463
+ userConSty: {
464
+ marginHorizontal: moderateScale(10),
465
+ width: moderateScale(30),
466
+ height: moderateScale(30),
467
+ borderRadius: moderateScale(15),
468
+ borderWidth: 1.5,
469
+ borderColor: theme.colors.imageBorder,
470
+ backgroundColor: theme.colors.background,
471
+ alignItems: 'center',
472
+ justifyContent: 'center',
473
+ },
474
+ userNameSty: {
475
+ marginTop: moderateScale(5),
476
+ color: theme.colors.white,
477
+ fontFamily: Fonts.outfitMedium,
478
+ fontSize: moderateScale(15),
479
+ },
480
+ userDetailsSty: {
481
+ width: moderateScale(30),
482
+ height: moderateScale(30),
483
+ borderRadius: moderateScale(15),
484
+ },
485
+ placeholderLogoHeader: {
486
+ width: moderateScale(20),
487
+ height: moderateScale(20),
488
+ borderRadius: moderateScale(10),
489
+ alignItems: 'center',
490
+ justifyContent: 'center',
491
+ },
492
+ content: {
493
+ flex: 1,
494
+ backgroundColor: theme.colors.white,
495
+ paddingHorizontal: theme.spacing.lg,
496
+ marginTop: theme.spacing.md,
497
+ paddingTop: theme.spacing.md,
498
+ borderTopLeftRadius: moderateScale(30),
499
+ borderTopRightRadius: moderateScale(30),
500
+ },
501
+ scrollContent: {
502
+ paddingBottom: theme.spacing.xl,
503
+ },
504
+ imageContainer: {
505
+ width: '100%',
506
+ height: moderateScale(200),
507
+ },
508
+ raffleImage: {
509
+ width: '100%',
510
+ height: '100%',
511
+ resizeMode: 'cover',
512
+ borderRadius: moderateScale(18),
513
+ },
514
+ mainContent: {
515
+ paddingTop: theme.spacing.md,
516
+ },
517
+ title: {
518
+ fontFamily: Fonts.outfitBold,
519
+ fontSize: moderateScale(18),
520
+ color: theme.colors.text,
521
+ marginBottom: moderateScale(8),
522
+ },
523
+ dateRange: {
524
+ fontFamily: Fonts.outfitRegular,
525
+ fontSize: moderateScale(13),
526
+ color: theme.colors.text,
527
+ marginBottom: moderateScale(16),
528
+ },
529
+ buyButton: {
530
+ backgroundColor: theme.colors.blue,
531
+ borderRadius: moderateScale(25),
532
+ paddingVertical: moderateScale(14),
533
+ alignItems: 'center',
534
+ justifyContent: 'center',
535
+ flexDirection: 'row',
536
+ width: '100%',
537
+ marginBottom: moderateScale(16),
538
+ },
539
+ buyButtonDisabled: {
540
+ backgroundColor: theme.colors.textSecondary,
541
+ opacity: 0.7,
542
+ },
543
+ buyButtonText: {
544
+ fontFamily: Fonts.outfitSemiBold,
545
+ fontSize: moderateScale(16),
546
+ color: theme.colors.white,
547
+ },
548
+ prizePoolContainer: {
549
+ flexDirection: 'row',
550
+ alignItems: 'center',
551
+ justifyContent: 'center',
552
+ marginBottom: moderateScale(4),
553
+ },
554
+ prizePoolLabel: {
555
+ fontFamily: Fonts.outfitRegular,
556
+ fontSize: moderateScale(16),
557
+ color: theme.colors.appleGreen,
558
+ },
559
+ prizeAmount: {
560
+ fontFamily: Fonts.outfitSemiBold,
561
+ fontSize: moderateScale(16),
562
+ color: theme.colors.appleGreen,
563
+ },
564
+ drawDateContainer: {
565
+ alignItems: 'center',
566
+ },
567
+ drawDate: {
568
+ fontFamily: Fonts.outfitRegular,
569
+ fontSize: moderateScale(12),
570
+ color: theme.colors.textSecondary,
571
+ },
572
+ section: {
573
+ marginBottom: moderateScale(20),
574
+ },
575
+ sectionTitle: {
576
+ fontFamily: Fonts.outfitBold,
577
+ fontSize: moderateScale(16),
578
+ color: theme.colors.text,
579
+ marginBottom: moderateScale(8),
580
+ },
581
+ description: {
582
+ fontFamily: Fonts.outfitRegular,
583
+ fontSize: moderateScale(13),
584
+ color: theme.colors.text,
585
+ lineHeight: moderateScale(20),
586
+ marginBottom: moderateScale(12),
587
+ },
588
+ detailsButton: {
589
+ backgroundColor: theme.colors.white,
590
+ borderWidth: 1.5,
591
+ borderColor: theme.colors.blue,
592
+ borderRadius: moderateScale(25),
593
+ paddingVertical: moderateScale(14),
594
+ alignItems: 'center',
595
+ marginBottom: moderateScale(12),
596
+ },
597
+ detailsButtonText: {
598
+ fontFamily: Fonts.outfitSemiBold,
599
+ fontSize: moderateScale(14),
600
+ color: theme.colors.blue,
601
+ },
602
+ termsButton: {
603
+ flexDirection: 'row',
604
+ alignItems: 'center',
605
+ justifyContent: 'space-between',
606
+ backgroundColor: theme.colors.lightLavenderGray,
607
+ borderRadius: theme.borderRadius.lg,
608
+ paddingVertical: theme.spacing.md,
609
+ paddingHorizontal: theme.spacing.md,
610
+ marginBottom: theme.spacing.md,
611
+ },
612
+ termsButtonText: {
613
+ fontFamily: Fonts.outfitSemiBold,
614
+ fontSize: moderateScale(14),
615
+ color: theme.colors.blue,
616
+ flex: 1,
617
+ marginLeft: theme.spacing.sm,
618
+ },
619
+ infoRow: {
620
+ flexDirection: 'row',
621
+ alignItems: 'center',
622
+ backgroundColor: theme.colors.white,
623
+ paddingVertical: moderateScale(14),
624
+ marginBottom: moderateScale(10),
625
+ borderBottomWidth: 1.5,
626
+ borderColor: theme.colors.lightLavenderGray,
627
+ },
628
+ infoRowIconBG: {
629
+ backgroundColor: theme.colors.lightLavenderGray,
630
+ padding: moderateScale(12),
631
+ borderRadius: theme.borderRadius.xxl
632
+ },
633
+ infoTextContainer: {
634
+ marginLeft: moderateScale(16),
635
+ flex: 1,
636
+ },
637
+ infoLabel: {
638
+ fontFamily: Fonts.outfitBold,
639
+ fontSize: moderateScale(13),
640
+ color: theme.colors.text,
641
+ marginBottom: moderateScale(2),
642
+ },
643
+ infoValue: {
644
+ fontFamily: Fonts.outfitRegular,
645
+ fontSize: moderateScale(13),
646
+ color: theme.colors.text,
647
+ },
648
+ reminderButton: {
649
+ backgroundColor: theme.colors.white,
650
+ borderRadius: moderateScale(25),
651
+ paddingVertical: moderateScale(14),
652
+ alignItems: 'center',
653
+ marginBottom: moderateScale(20),
654
+ borderWidth: 1.5,
655
+ borderColor: theme.colors.blue,
656
+ },
657
+ reminderButtonText: {
658
+ fontFamily: Fonts.outfitSemiBold,
659
+ fontSize: moderateScale(14),
660
+ color: theme.colors.blue,
661
+ },
662
+ prizesContainer: {
663
+ gap: moderateScale(12),
664
+ },
665
+ prizeCard: {
666
+ flex: 1,
667
+ flexDirection: 'row',
668
+ borderRadius: moderateScale(12),
669
+ },
670
+ prizePosition: {
671
+ fontFamily: Fonts.outfitSemiBold,
672
+ fontSize: moderateScale(14),
673
+ color: theme.colors.blue,
674
+ },
675
+ prizeText: {
676
+ fontFamily: Fonts.outfitSemiBold,
677
+ fontSize: moderateScale(10),
678
+ color: theme.colors.paraText,
679
+ },
680
+ prizeImage: {
681
+ width: '100%',
682
+ height: moderateScale(120),
683
+ borderRadius: moderateScale(8),
684
+ },
685
+ prizeTitle: {
686
+ fontFamily: Fonts.outfitSemiBold,
687
+ fontSize: theme.typography.fontSize.md,
688
+ color: theme.colors.text,
689
+ marginBottom: theme.spacing.sm,
690
+ },
691
+ prizeAmountText: {
692
+ fontFamily: Fonts.outfitRegular,
693
+ fontSize: moderateScale(13),
694
+ color: theme.colors.black,
695
+ },
696
+ // Modal Styles (matching JoinClub pattern)
697
+ modalOverlay: {
698
+ flex: 1,
699
+ justifyContent: 'flex-end',
700
+ },
701
+ modalBackdrop: {
702
+ position: 'absolute',
703
+ top: 0,
704
+ left: 0,
705
+ right: 0,
706
+ bottom: 0,
707
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
708
+ },
709
+ modalContainer: {
710
+ backgroundColor: theme.colors.white,
711
+ borderTopLeftRadius: moderateScale(20),
712
+ borderTopRightRadius: moderateScale(20),
713
+ paddingHorizontal: theme.spacing.lg,
714
+ paddingTop: theme.spacing.sm,
715
+ paddingBottom: theme.spacing.xl,
716
+ height: '75%',
717
+ maxHeight: '75%',
718
+ },
719
+ dragHandle: {
720
+ width: moderateScale(40),
721
+ height: moderateScale(4),
722
+ backgroundColor: theme.colors.border,
723
+ borderRadius: moderateScale(2),
724
+ alignSelf: 'center',
725
+ marginBottom: theme.spacing.sm,
726
+ },
727
+ modalHeader: {
728
+ flexDirection: 'row',
729
+ justifyContent: 'space-between',
730
+ alignItems: 'center',
731
+ paddingVertical: theme.spacing.sm,
732
+ marginBottom: theme.spacing.sm,
733
+ },
734
+ modalTitle: {
735
+ fontFamily: Fonts.outfitBold,
736
+ fontSize: moderateScale(18),
737
+ color: theme.colors.text,
738
+ },
739
+ closeButton: {
740
+ width: moderateScale(30),
741
+ height: moderateScale(30),
742
+ borderRadius: moderateScale(15),
743
+ backgroundColor: '#F5F7FA',
744
+ alignItems: 'center',
745
+ justifyContent: 'center',
746
+ },
747
+ closeButtonText: {
748
+ fontSize: moderateScale(20),
749
+ color: theme.colors.text,
750
+ fontWeight: 'bold',
751
+ },
752
+ modalScrollView: {
753
+ flex: 1,
754
+ },
755
+ noDescriptionText: {
756
+ fontFamily: Fonts.outfitRegular,
757
+ fontSize: moderateScale(14),
758
+ color: theme.colors.textSecondary,
759
+ textAlign: 'center',
760
+ marginTop: theme.spacing.xl,
761
+ },
762
+ });