@varunindiit/create-rn-starter 1.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 (243) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/bin/index.js +270 -0
  4. package/lib/prompt.js +63 -0
  5. package/lib/rename.js +239 -0
  6. package/lib/scaffold.js +110 -0
  7. package/lib/utils.js +122 -0
  8. package/package.json +38 -0
  9. package/template/.eslintrc.js +4 -0
  10. package/template/.prettierrc.js +5 -0
  11. package/template/.watchmanconfig +1 -0
  12. package/template/App.tsx +100 -0
  13. package/template/Gemfile +17 -0
  14. package/template/README.md +97 -0
  15. package/template/__tests__/App.test.tsx +13 -0
  16. package/template/_gitignore +75 -0
  17. package/template/android/app/build.gradle +119 -0
  18. package/template/android/app/debug.keystore +0 -0
  19. package/template/android/app/proguard-rules.pro +10 -0
  20. package/template/android/app/src/main/AndroidManifest.xml +45 -0
  21. package/template/android/app/src/main/assets/fonts/MonaSans-Black.ttf +0 -0
  22. package/template/android/app/src/main/assets/fonts/MonaSans-BlackItalic.ttf +0 -0
  23. package/template/android/app/src/main/assets/fonts/MonaSans-Bold.ttf +0 -0
  24. package/template/android/app/src/main/assets/fonts/MonaSans-BoldItalic.ttf +0 -0
  25. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraBold.ttf +0 -0
  26. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraBoldItalic.ttf +0 -0
  27. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraLight.ttf +0 -0
  28. package/template/android/app/src/main/assets/fonts/MonaSans-ExtraLightItalic.ttf +0 -0
  29. package/template/android/app/src/main/assets/fonts/MonaSans-Italic.ttf +0 -0
  30. package/template/android/app/src/main/assets/fonts/MonaSans-Light.ttf +0 -0
  31. package/template/android/app/src/main/assets/fonts/MonaSans-LightItalic.ttf +0 -0
  32. package/template/android/app/src/main/assets/fonts/MonaSans-Medium.ttf +0 -0
  33. package/template/android/app/src/main/assets/fonts/MonaSans-MediumItalic.ttf +0 -0
  34. package/template/android/app/src/main/assets/fonts/MonaSans-Regular.ttf +0 -0
  35. package/template/android/app/src/main/assets/fonts/MonaSans-SemiBold.ttf +0 -0
  36. package/template/android/app/src/main/assets/fonts/MonaSans-SemiBoldItalic.ttf +0 -0
  37. package/template/android/app/src/main/java/com/awesomeproject/MainActivity.kt +22 -0
  38. package/template/android/app/src/main/java/com/awesomeproject/MainApplication.kt +27 -0
  39. package/template/android/app/src/main/res/drawable/launch_screen.png +0 -0
  40. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  41. package/template/android/app/src/main/res/layout/launch_screen.xml +12 -0
  42. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  43. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  44. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  45. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  46. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  47. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  48. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  49. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  50. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  51. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  52. package/template/android/app/src/main/res/values/colors.xml +3 -0
  53. package/template/android/app/src/main/res/values/strings.xml +3 -0
  54. package/template/android/app/src/main/res/values/styles.xml +11 -0
  55. package/template/android/build.gradle +21 -0
  56. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  57. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  58. package/template/android/gradle.properties +44 -0
  59. package/template/android/gradlew +248 -0
  60. package/template/android/gradlew.bat +98 -0
  61. package/template/android/link-assets-manifest.json +69 -0
  62. package/template/android/settings.gradle +6 -0
  63. package/template/app.json +4 -0
  64. package/template/babel.config.js +4 -0
  65. package/template/declarations.d.ts +6 -0
  66. package/template/env.example +20 -0
  67. package/template/index.js +10 -0
  68. package/template/ios/.xcode.env +11 -0
  69. package/template/ios/.xcode.env.local +1 -0
  70. package/template/ios/AwesomeProject/AppDelegate.swift +60 -0
  71. package/template/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  72. package/template/ios/AwesomeProject/Images.xcassets/Contents.json +6 -0
  73. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Contents.json +23 -0
  74. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@1x.png +0 -0
  75. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@2x.png +0 -0
  76. package/template/ios/AwesomeProject/Images.xcassets/Splash.imageset/Splash@3x.png +0 -0
  77. package/template/ios/AwesomeProject/Info.plist +89 -0
  78. package/template/ios/AwesomeProject/LaunchScreen.storyboard +40 -0
  79. package/template/ios/AwesomeProject/PrivacyInfo.xcprivacy +38 -0
  80. package/template/ios/AwesomeProject.xcodeproj/project.pbxproj +576 -0
  81. package/template/ios/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject.xcscheme +88 -0
  82. package/template/ios/AwesomeProject.xcworkspace/contents.xcworkspacedata +10 -0
  83. package/template/ios/Podfile +68 -0
  84. package/template/ios/link-assets-manifest.json +69 -0
  85. package/template/jest.config.js +3 -0
  86. package/template/metro.config.js +24 -0
  87. package/template/package.json +68 -0
  88. package/template/react-native.config.js +7 -0
  89. package/template/src/assets/fonts/MonaSans-Black.ttf +0 -0
  90. package/template/src/assets/fonts/MonaSans-BlackItalic.ttf +0 -0
  91. package/template/src/assets/fonts/MonaSans-Bold.ttf +0 -0
  92. package/template/src/assets/fonts/MonaSans-BoldItalic.ttf +0 -0
  93. package/template/src/assets/fonts/MonaSans-ExtraBold.ttf +0 -0
  94. package/template/src/assets/fonts/MonaSans-ExtraBoldItalic.ttf +0 -0
  95. package/template/src/assets/fonts/MonaSans-ExtraLight.ttf +0 -0
  96. package/template/src/assets/fonts/MonaSans-ExtraLightItalic.ttf +0 -0
  97. package/template/src/assets/fonts/MonaSans-Italic.ttf +0 -0
  98. package/template/src/assets/fonts/MonaSans-Light.ttf +0 -0
  99. package/template/src/assets/fonts/MonaSans-LightItalic.ttf +0 -0
  100. package/template/src/assets/fonts/MonaSans-Medium.ttf +0 -0
  101. package/template/src/assets/fonts/MonaSans-MediumItalic.ttf +0 -0
  102. package/template/src/assets/fonts/MonaSans-Regular.ttf +0 -0
  103. package/template/src/assets/fonts/MonaSans-SemiBold.ttf +0 -0
  104. package/template/src/assets/fonts/MonaSans-SemiBoldItalic.ttf +0 -0
  105. package/template/src/assets/image/BackGroundAuth.png +0 -0
  106. package/template/src/assets/image/BackgroundVerification.png +0 -0
  107. package/template/src/assets/image/logo.png +0 -0
  108. package/template/src/assets/svg/add-circle.svg +5 -0
  109. package/template/src/assets/svg/airConditioning.svg +12 -0
  110. package/template/src/assets/svg/apple.svg +3 -0
  111. package/template/src/assets/svg/arrowDown.svg +3 -0
  112. package/template/src/assets/svg/back.svg +10 -0
  113. package/template/src/assets/svg/bag.svg +11 -0
  114. package/template/src/assets/svg/calender.svg +5 -0
  115. package/template/src/assets/svg/car.svg +10 -0
  116. package/template/src/assets/svg/carConfirm.svg +60 -0
  117. package/template/src/assets/svg/chatActive.svg +3 -0
  118. package/template/src/assets/svg/chatUnActive.svg +3 -0
  119. package/template/src/assets/svg/document-text.svg +6 -0
  120. package/template/src/assets/svg/gender.svg +11 -0
  121. package/template/src/assets/svg/google.svg +6 -0
  122. package/template/src/assets/svg/headphone.svg +3 -0
  123. package/template/src/assets/svg/homeActive.svg +3 -0
  124. package/template/src/assets/svg/homeUnActive.svg +3 -0
  125. package/template/src/assets/svg/logo.svg +18 -0
  126. package/template/src/assets/svg/logout.svg +5 -0
  127. package/template/src/assets/svg/maxBack.svg +4 -0
  128. package/template/src/assets/svg/message-text.svg +7 -0
  129. package/template/src/assets/svg/music.svg +5 -0
  130. package/template/src/assets/svg/noSmoking.svg +10 -0
  131. package/template/src/assets/svg/notification.svg +5 -0
  132. package/template/src/assets/svg/passenger.svg +4 -0
  133. package/template/src/assets/svg/phone.svg +3 -0
  134. package/template/src/assets/svg/rightArrow.svg +3 -0
  135. package/template/src/assets/svg/security-user.svg +5 -0
  136. package/template/src/assets/svg/star.svg +3 -0
  137. package/template/src/assets/svg/tick-circle.svg +4 -0
  138. package/template/src/assets/svg/trafficLight.svg +41 -0
  139. package/template/src/assets/svg/tripActive.svg +10 -0
  140. package/template/src/assets/svg/tripUnActive.svg +10 -0
  141. package/template/src/assets/svg/usbChargers.svg +3 -0
  142. package/template/src/assets/svg/user.svg +4 -0
  143. package/template/src/assets/svg/userActive.svg +3 -0
  144. package/template/src/assets/svg/userPlaceholder.svg +3 -0
  145. package/template/src/assets/svg/userUnActive.svg +3 -0
  146. package/template/src/components/AuthLayout/AuthLayout.tsx +170 -0
  147. package/template/src/components/AuthLayout/index.ts +1 -0
  148. package/template/src/components/BottomSheet/BottomSheet.tsx +73 -0
  149. package/template/src/components/BottomSheet/BottomSheetAlert.tsx +100 -0
  150. package/template/src/components/BottomSheet/CenterAlert.tsx +153 -0
  151. package/template/src/components/BottomSheet/index.ts +2 -0
  152. package/template/src/components/BottomTabBar/index.tsx +145 -0
  153. package/template/src/components/Button/RNButton.tsx +152 -0
  154. package/template/src/components/Button/index.ts +2 -0
  155. package/template/src/components/Common/Avatar.tsx +80 -0
  156. package/template/src/components/Common/Card.tsx +49 -0
  157. package/template/src/components/Common/CardBrandLogo.tsx +66 -0
  158. package/template/src/components/Common/Checkbox.tsx +65 -0
  159. package/template/src/components/Common/Chip.tsx +79 -0
  160. package/template/src/components/Common/CommonStyles.tsx +594 -0
  161. package/template/src/components/Common/Divider.tsx +33 -0
  162. package/template/src/components/Common/DriverTripCard.tsx +308 -0
  163. package/template/src/components/Common/Dropdown.tsx +161 -0
  164. package/template/src/components/Common/EmptyState.tsx +52 -0
  165. package/template/src/components/Common/FAB.tsx +68 -0
  166. package/template/src/components/Common/HeaderLocation.tsx +108 -0
  167. package/template/src/components/Common/Loader.tsx +23 -0
  168. package/template/src/components/Common/RatingStars.tsx +103 -0
  169. package/template/src/components/Common/RouteDots.tsx +98 -0
  170. package/template/src/components/Common/SegmentedControl.tsx +126 -0
  171. package/template/src/components/Common/SosButton.tsx +80 -0
  172. package/template/src/components/Common/SosSheet.tsx +344 -0
  173. package/template/src/components/Common/StarRating.tsx +58 -0
  174. package/template/src/components/Common/StatusBadge.tsx +56 -0
  175. package/template/src/components/Common/Toggle.tsx +66 -0
  176. package/template/src/components/Common/TripCard.tsx +247 -0
  177. package/template/src/components/Common/UploadBox.tsx +106 -0
  178. package/template/src/components/Container/MainContainer.tsx +76 -0
  179. package/template/src/components/Container/index.ts +1 -0
  180. package/template/src/components/Header/index.tsx +143 -0
  181. package/template/src/components/Icon/SvgIcons.tsx +1991 -0
  182. package/template/src/components/ImagePickerSheet/ImagePickerSheet.tsx +233 -0
  183. package/template/src/components/ImagePickerSheet/index.ts +2 -0
  184. package/template/src/components/Input/CountryDropdown.tsx +71 -0
  185. package/template/src/components/Input/OtpInput.tsx +117 -0
  186. package/template/src/components/Input/RNInput.tsx +138 -0
  187. package/template/src/components/Input/index.ts +4 -0
  188. package/template/src/components/Picker/DatePickerSheet.tsx +393 -0
  189. package/template/src/components/Picker/PassengerPickerSheet.tsx +237 -0
  190. package/template/src/components/Text/RNText.tsx +62 -0
  191. package/template/src/components/Text/index.ts +1 -0
  192. package/template/src/components/index.ts +44 -0
  193. package/template/src/hooks/useCurrentLocation.ts +72 -0
  194. package/template/src/localization/i18n.ts +29 -0
  195. package/template/src/localization/i18next.d.ts +11 -0
  196. package/template/src/localization/index.ts +4 -0
  197. package/template/src/localization/languageStorage.ts +27 -0
  198. package/template/src/localization/languages.ts +62 -0
  199. package/template/src/localization/resources/en.ts +703 -0
  200. package/template/src/localization/resources/fr.ts +703 -0
  201. package/template/src/localization/useLanguage.ts +42 -0
  202. package/template/src/navigation/AuthNavigation.tsx +23 -0
  203. package/template/src/navigation/BottomTabs.tsx +24 -0
  204. package/template/src/navigation/RootNavigation.tsx +27 -0
  205. package/template/src/navigation/RouteKey.ts +22 -0
  206. package/template/src/navigation/StackNavigation.tsx +52 -0
  207. package/template/src/navigation/paramLists.ts +25 -0
  208. package/template/src/redux/slice/app.ts +66 -0
  209. package/template/src/redux/slice/auth.ts +40 -0
  210. package/template/src/redux/slice/userProfile.ts +124 -0
  211. package/template/src/redux/store.ts +17 -0
  212. package/template/src/screen/auth/Login.tsx +69 -0
  213. package/template/src/screen/onboarding/LanguageSelection.tsx +231 -0
  214. package/template/src/screen/root/home/index.tsx +36 -0
  215. package/template/src/screen/root/profile/index.tsx +69 -0
  216. package/template/src/screen/shared/Chat.tsx +308 -0
  217. package/template/src/screen/shared/EditProfile.tsx +407 -0
  218. package/template/src/screen/shared/HelpSupport.tsx +678 -0
  219. package/template/src/screen/shared/LocationSearch.tsx +362 -0
  220. package/template/src/screen/shared/Messages.tsx +115 -0
  221. package/template/src/screen/shared/Notifications.tsx +86 -0
  222. package/template/src/screen/shared/PrivacyPolicy.tsx +297 -0
  223. package/template/src/screen/shared/Profile.tsx +118 -0
  224. package/template/src/screen/shared/Ratings.tsx +170 -0
  225. package/template/src/screen/shared/TermsConditions.tsx +315 -0
  226. package/template/src/screen/shared/profile/DriverProfile.tsx +262 -0
  227. package/template/src/screen/shared/profile/PassengerProfile.tsx +123 -0
  228. package/template/src/screen/shared/profile/ProfileParts.tsx +219 -0
  229. package/template/src/services/Config.ts +37 -0
  230. package/template/src/services/api.ts +37 -0
  231. package/template/src/services/index.ts +4 -0
  232. package/template/src/services/places.ts +320 -0
  233. package/template/src/services/storage.ts +33 -0
  234. package/template/src/theme/fonts.ts +30 -0
  235. package/template/src/theme/index.ts +3 -0
  236. package/template/src/theme/spacing.ts +66 -0
  237. package/template/src/theme/theme.ts +58 -0
  238. package/template/src/types/env.d.ts +8 -0
  239. package/template/src/types/index.ts +3 -0
  240. package/template/src/utils/card.ts +101 -0
  241. package/template/src/utils/constants.ts +39 -0
  242. package/template/src/utils/functions.ts +24 -0
  243. package/template/tsconfig.json +8 -0
@@ -0,0 +1,297 @@
1
+ import React from 'react';
2
+ import { ScrollView, StyleSheet, View } from 'react-native';
3
+ import { moderateScale } from 'react-native-size-matters';
4
+ import LinearGradient from 'react-native-linear-gradient';
5
+ import Svg, { Path } from 'react-native-svg';
6
+ import { Card, Header, MainContainer, RNText } from '../../components';
7
+ import { SPACING, THEME } from '../../theme';
8
+ import { useLanguage } from '../../localization';
9
+ import { ShieldCheckIcon, PrivacyIcon } from '../../components/Icon/SvgIcons';
10
+
11
+ interface Section {
12
+ title: string;
13
+ body: string;
14
+ }
15
+
16
+ const SECTIONS: Section[] = [
17
+ {
18
+ title: 'Information We Collect',
19
+ body: 'When you use HD WAKA we collect information you provide directly — your name, phone number, email, profile photo, government ID and payment details. We also collect data automatically while you use the app, including device information, approximate and precise location, ride history and in-app interactions.',
20
+ },
21
+ {
22
+ title: 'How We Use Your Information',
23
+ body: 'Your information helps us match you with rides, verify driver and passenger identities, process payments, prevent fraud, and improve safety. We also use it to personalise your experience, send service updates, and ensure compliance with applicable laws.',
24
+ },
25
+ {
26
+ title: 'Sharing & Disclosure',
27
+ body: 'We share limited information with drivers or passengers to complete a trip, with payment partners to process transactions, and with trusted service providers under strict confidentiality. We never sell your personal data to advertisers.',
28
+ },
29
+ {
30
+ title: 'Data Security',
31
+ body: 'We protect your data with industry-standard encryption in transit and at rest, restricted access controls, continuous monitoring, and regular security audits. While no system is perfectly secure, we work hard to safeguard your information.',
32
+ },
33
+ {
34
+ title: 'Your Rights & Choices',
35
+ body: 'You can access, update, or delete your account information at any time from the Profile section. You may also opt out of marketing communications, manage notification preferences, and request a copy of your data by contacting our support team.',
36
+ },
37
+ {
38
+ title: 'Location Data',
39
+ body: 'Location is core to HD WAKA. We collect it only when the app is in use or as you’ve allowed in your device settings. You can disable location at any time, although certain features such as ride booking will not work without it.',
40
+ },
41
+ {
42
+ title: 'Children’s Privacy',
43
+ body: 'HD WAKA is not intended for users under 18. We do not knowingly collect personal information from children. If you believe a child has provided us data, please contact us so we can remove it.',
44
+ },
45
+ {
46
+ title: 'Changes to This Policy',
47
+ body: 'We may update this Privacy Policy from time to time. When we do, we’ll notify you in the app and update the “Last Updated” date below. Continued use of HD WAKA after changes means you accept the revised policy.',
48
+ },
49
+ ];
50
+
51
+ const PrivacyPolicy: React.FC = () => {
52
+ const { t } = useLanguage();
53
+ return (
54
+ <MainContainer
55
+ gradient
56
+ gradientColors={['#FBE3CD', '#FFF6EC', '#FFFFFF']}
57
+ gradientStart={{ x: 0, y: 0 }}
58
+ gradientEnd={{ x: 0, y: 0.45 }}
59
+ >
60
+ <Header title={t('profile.privacyPolicy')} safeArea={false} />
61
+
62
+ <ScrollView
63
+ contentContainerStyle={styles.scroll}
64
+ showsVerticalScrollIndicator={false}
65
+ >
66
+ <LinearGradient
67
+ colors={['#E87C3E', '#F08F4E']}
68
+ start={{ x: 0, y: 0 }}
69
+ end={{ x: 1, y: 1 }}
70
+ style={{borderRadius: moderateScale(22),}}
71
+ >
72
+ <View style={styles.hero}>
73
+ <View style={styles.heroIconWrap}>
74
+ <PrivacyIcon size={moderateScale(30)} color="#FFFFFF" />
75
+ </View>
76
+ <RNText
77
+ font="bold"
78
+ size={20}
79
+ color="#FFFFFF"
80
+ style={styles.heroTitle}
81
+ >
82
+ Your Privacy Matters
83
+ </RNText>
84
+ <RNText
85
+ size={13}
86
+ color="rgba(255,255,255,0.92)"
87
+ style={styles.heroSubtitle}
88
+ lineHeight={moderateScale(19)}
89
+ >
90
+ We’re committed to keeping your data safe and being transparent
91
+ about how we use it.
92
+ </RNText>
93
+ <View style={styles.updatedPill}>
94
+ <View style={styles.updatedDot} />
95
+ <RNText font="medium" size={11} color="#FFFFFF">
96
+ Last Updated · May 12, 2026
97
+ </RNText>
98
+ </View>
99
+ </View>
100
+ </LinearGradient>
101
+
102
+ <Card padding={moderateScale(16)} style={styles.introCard} shadow>
103
+ <View style={styles.introRow}>
104
+ <View style={styles.introIcon}>
105
+ <ShieldCheckIcon size={moderateScale(18)} color={THEME.primary} />
106
+ </View>
107
+ <RNText
108
+ font="semibold"
109
+ size={14}
110
+ color={THEME.text}
111
+ style={styles.flexOne}
112
+ >
113
+ Overview
114
+ </RNText>
115
+ </View>
116
+ <RNText
117
+ size={13}
118
+ color={THEME.textSecondary}
119
+ lineHeight={moderateScale(20)}
120
+ style={styles.introBody}
121
+ >
122
+ This Privacy Policy explains what information HD WAKA collects when
123
+ you use our ride-sharing platform, how we use it, and the choices
124
+ you have. Please read it carefully — it’s your guide to staying in
125
+ control of your information.
126
+ </RNText>
127
+ </Card>
128
+
129
+ {SECTIONS.map((section, idx) => (
130
+ <SectionCard
131
+ key={section.title}
132
+ index={idx + 1}
133
+ title={section.title}
134
+ body={section.body}
135
+ />
136
+ ))}
137
+
138
+ <View style={styles.footer}>
139
+ <RNText
140
+ size={12}
141
+ color={THEME.textMuted}
142
+ textAlign="center"
143
+ lineHeight={moderateScale(18)}
144
+ >
145
+ Questions about this policy? Reach our team at{'\n'}
146
+ <RNText font="semibold" size={12} color={THEME.primary}>
147
+ privacy@hdwaka.com
148
+ </RNText>
149
+ </RNText>
150
+ </View>
151
+ </ScrollView>
152
+ </MainContainer>
153
+ );
154
+ };
155
+
156
+ const SectionCard: React.FC<{
157
+ index: number;
158
+ title: string;
159
+ body: string;
160
+ }> = ({ index, title, body }) => (
161
+ <Card padding={moderateScale(16)} style={styles.sectionCard} shadow={false}>
162
+ <View style={styles.sectionHead}>
163
+ <View style={styles.indexBadge}>
164
+ <RNText font="bold" size={12} color={THEME.primary}>
165
+ {String(index).padStart(2, '0')}
166
+ </RNText>
167
+ </View>
168
+ <RNText
169
+ font="semibold"
170
+ size={15}
171
+ color={THEME.text}
172
+ style={styles.flexOne}
173
+ >
174
+ {title}
175
+ </RNText>
176
+ <CheckTick size={moderateScale(16)} />
177
+ </View>
178
+ <RNText
179
+ size={13}
180
+ color={THEME.textSecondary}
181
+ lineHeight={moderateScale(20)}
182
+ style={styles.sectionBody}
183
+ >
184
+ {body}
185
+ </RNText>
186
+ </Card>
187
+ );
188
+
189
+ const CheckTick: React.FC<{ size?: number }> = ({ size = 16 }) => (
190
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
191
+ <Path
192
+ d="M10 1.67A8.33 8.33 0 1 0 18.33 10 8.34 8.34 0 0 0 10 1.67Zm3.92 6.92-4.58 4.58a.75.75 0 0 1-1.06 0L6.08 11A.75.75 0 0 1 7.14 9.94l1.67 1.67 4.05-4.05a.75.75 0 1 1 1.06 1.06Z"
193
+ fill={THEME.primary}
194
+ />
195
+ </Svg>
196
+ );
197
+
198
+ export default PrivacyPolicy;
199
+
200
+ const styles = StyleSheet.create({
201
+ flexOne: {
202
+ flex: 1,
203
+ },
204
+ scroll: {
205
+ paddingHorizontal: SPACING.hPadding,
206
+ paddingBottom: moderateScale(48),
207
+ paddingTop: moderateScale(6),
208
+ },
209
+ hero: {
210
+ borderRadius: moderateScale(22),
211
+ paddingHorizontal: moderateScale(20),
212
+ paddingTop: moderateScale(22),
213
+ paddingBottom: moderateScale(20),
214
+ overflow: 'hidden',
215
+ shadowColor: THEME.primary,
216
+ shadowOffset: { width: 0, height: 10 },
217
+ shadowOpacity: 0.18,
218
+ shadowRadius: 18,
219
+ elevation: 4,
220
+ },
221
+ heroIconWrap: {
222
+ width: moderateScale(54),
223
+ height: moderateScale(54),
224
+ borderRadius: moderateScale(16),
225
+ backgroundColor: 'rgba(255,255,255,0.22)',
226
+ alignItems: 'center',
227
+ justifyContent: 'center',
228
+ marginBottom: moderateScale(14),
229
+ },
230
+ heroTitle: {
231
+ marginBottom: moderateScale(6),
232
+ },
233
+ heroSubtitle: {
234
+ marginBottom: moderateScale(16),
235
+ maxWidth: '92%',
236
+ },
237
+ updatedPill: {
238
+ flexDirection: 'row',
239
+ alignItems: 'center',
240
+ alignSelf: 'flex-start',
241
+ backgroundColor: 'rgba(255,255,255,0.22)',
242
+ paddingHorizontal: moderateScale(12),
243
+ paddingVertical: moderateScale(6),
244
+ borderRadius: moderateScale(999),
245
+ },
246
+ updatedDot: {
247
+ width: moderateScale(6),
248
+ height: moderateScale(6),
249
+ borderRadius: moderateScale(3),
250
+ backgroundColor: '#FFFFFF',
251
+ marginRight: moderateScale(8),
252
+ },
253
+ introCard: {
254
+ marginTop: moderateScale(18),
255
+ borderWidth: 1,
256
+ borderColor: 'rgba(232,124,62,0.14)',
257
+ },
258
+ introRow: {
259
+ flexDirection: 'row',
260
+ alignItems: 'center',
261
+ marginBottom: moderateScale(10),
262
+ },
263
+ introIcon: {
264
+ width: moderateScale(32),
265
+ height: moderateScale(32),
266
+ borderRadius: moderateScale(10),
267
+ backgroundColor: THEME.primaryFaint,
268
+ alignItems: 'center',
269
+ justifyContent: 'center',
270
+ marginRight: moderateScale(10),
271
+ },
272
+ introBody: {},
273
+ sectionCard: {
274
+ marginTop: moderateScale(14),
275
+ borderWidth: 1,
276
+ borderColor: 'rgba(44,26,14,0.06)',
277
+ },
278
+ sectionHead: {
279
+ flexDirection: 'row',
280
+ alignItems: 'center',
281
+ marginBottom: moderateScale(10),
282
+ },
283
+ indexBadge: {
284
+ width: moderateScale(34),
285
+ height: moderateScale(28),
286
+ borderRadius: moderateScale(8),
287
+ backgroundColor: THEME.primaryFaint,
288
+ alignItems: 'center',
289
+ justifyContent: 'center',
290
+ marginRight: moderateScale(12),
291
+ },
292
+ sectionBody: {},
293
+ footer: {
294
+ marginTop: moderateScale(28),
295
+ alignItems: 'center',
296
+ },
297
+ });
@@ -0,0 +1,118 @@
1
+ import React, { useState } from 'react';
2
+ import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
3
+ import { moderateScale } from 'react-native-size-matters';
4
+ import { useDispatch, useSelector } from 'react-redux';
5
+ import {
6
+ BottomSheetAlert,
7
+ MainContainer,
8
+ RNText,
9
+ Toggle,
10
+ } from '../../components';
11
+ import { THEME } from '../../theme';
12
+ import { LogoutIcon } from '../../components/Icon/SvgIcons';
13
+ import { RootState } from '../../redux/store';
14
+ import { resetAuthState, setRole } from '../../redux/slice/auth';
15
+ import { useLanguage } from '../../localization';
16
+ import DriverProfile from './profile/DriverProfile';
17
+ import PassengerProfile from './profile/PassengerProfile';
18
+
19
+ const Profile: React.FC = () => {
20
+ const dispatch = useDispatch();
21
+ const { t } = useLanguage();
22
+ const { role } = useSelector((s: RootState) => s.auth);
23
+ const [logoutOpen, setLogoutOpen] = useState(false);
24
+ const isDriver = role === 'driver';
25
+
26
+ const switchRole = () => {
27
+ dispatch(setRole(isDriver ? 'passenger' : 'driver'));
28
+ };
29
+
30
+ return (
31
+ <MainContainer
32
+ gradient
33
+ gradientColors={['#FBE3CD', '#FFF6EC', '#FFFFFF']}
34
+ gradientStart={{ x: 0, y: 0 }}
35
+ gradientEnd={{ x: 0, y: 0.45 }}
36
+ >
37
+ <View style={styles.headerRow}>
38
+ <RNText font="bold" size={24} color={THEME.text}>
39
+ {t('profile.title')}
40
+ </RNText>
41
+ <View style={styles.headerRight}>
42
+ <RNText font="semibold" size={13} color={THEME.text}>
43
+ {isDriver ? t('role.switchToPassenger') : t('role.switchToDriver')}
44
+ </RNText>
45
+ <Toggle value={isDriver} onChange={switchRole} />
46
+ </View>
47
+ </View>
48
+
49
+ <ScrollView
50
+ contentContainerStyle={styles.scroll}
51
+ showsVerticalScrollIndicator={false}
52
+ >
53
+ {isDriver ? <DriverProfile /> : <PassengerProfile />}
54
+
55
+ <TouchableOpacity
56
+ style={styles.logoutRow}
57
+ activeOpacity={0.7}
58
+ onPress={() => setLogoutOpen(true)}
59
+ >
60
+ <LogoutIcon size={moderateScale(20)} color={THEME.danger} />
61
+ <RNText
62
+ font="semibold"
63
+ size={15}
64
+ color={THEME.danger}
65
+ style={styles.logoutLabel}
66
+ >
67
+ {t('profile.logOut')}
68
+ </RNText>
69
+ </TouchableOpacity>
70
+ </ScrollView>
71
+
72
+ <BottomSheetAlert
73
+ visible={logoutOpen}
74
+ onClose={() => setLogoutOpen(false)}
75
+ title={t('profile.logOut')}
76
+ description={t('profile.logOutConfirm')}
77
+ confirmText={t('profile.logOut')}
78
+ cancelText={t('common.cancel')}
79
+ destructive
80
+ onConfirm={() => {
81
+ setLogoutOpen(false);
82
+ dispatch(resetAuthState());
83
+ }}
84
+ />
85
+ </MainContainer>
86
+ );
87
+ };
88
+
89
+ export default Profile;
90
+
91
+ const styles = StyleSheet.create({
92
+ headerRow: {
93
+ flexDirection: 'row',
94
+ alignItems: 'center',
95
+ justifyContent: 'space-between',
96
+ paddingHorizontal: moderateScale(20),
97
+ paddingVertical: moderateScale(10),
98
+ paddingBottom: moderateScale(12),
99
+ },
100
+ headerRight: {
101
+ flexDirection: 'row',
102
+ alignItems: 'center',
103
+ gap: moderateScale(10),
104
+ },
105
+ scroll: {
106
+ paddingHorizontal: moderateScale(20),
107
+ paddingBottom: moderateScale(120),
108
+ paddingTop: moderateScale(12),
109
+ },
110
+ logoutRow: {
111
+ flexDirection: 'row',
112
+ alignItems: 'center',
113
+ paddingVertical: moderateScale(16),
114
+ paddingLeft: moderateScale(6),
115
+ marginTop: moderateScale(6),
116
+ },
117
+ logoutLabel: { marginLeft: moderateScale(12) },
118
+ });
@@ -0,0 +1,170 @@
1
+ import React, { useState } from "react";
2
+ import { ScrollView, StyleSheet, View } from "react-native";
3
+ import { useSelector } from "react-redux";
4
+ import { moderateScale } from "react-native-size-matters";
5
+ import {
6
+ Avatar,
7
+ Card,
8
+ Header,
9
+ MainContainer,
10
+ RNText,
11
+ SegmentedControl,
12
+ } from "../../components";
13
+ import { THEME, SPACING } from "../../theme";
14
+ import { RootState } from "../../redux/store";
15
+ import { useLanguage } from "../../localization";
16
+ import Svg, { Path } from "react-native-svg";
17
+
18
+ const StarIcon = ({
19
+ size = 14,
20
+ color = THEME.star,
21
+ filled = true,
22
+ }: {
23
+ size?: number;
24
+ color?: string;
25
+ filled?: boolean;
26
+ }) => (
27
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
28
+ <Path
29
+ d="M12 2.5l2.97 6.02 6.65.97-4.81 4.69 1.14 6.62L12 17.77 6.05 20.8l1.14-6.62L2.38 9.49l6.65-.97L12 2.5Z"
30
+ fill={filled ? color : "none"}
31
+ stroke={color}
32
+ strokeWidth={filled ? 0 : 1.6}
33
+ strokeLinejoin="round"
34
+ />
35
+ </Svg>
36
+ );
37
+
38
+ const SummaryStars = ({ value, total = 5 }: { value: number; total?: number }) => (
39
+ <View style={styles.summaryStarsRow}>
40
+ {Array.from({ length: total }).map((_, i) => (
41
+ <View key={i} style={{ marginRight: i === total - 1 ? 0 : moderateScale(8) }}>
42
+ <StarIcon size={moderateScale(28)} color={THEME.primary} filled={i < value} />
43
+ </View>
44
+ ))}
45
+ </View>
46
+ );
47
+
48
+ const Ratings: React.FC = () => {
49
+ const { t } = useLanguage();
50
+ const [tab, setTab] = useState("received");
51
+ const r = useSelector((s: RootState) => s.ratings);
52
+ const list = tab === "received" ? r.received : r.given;
53
+ const isReceived = tab === "received";
54
+
55
+ const TABS = [
56
+ { key: "received", label: t('common.received') },
57
+ { key: "given", label: t('common.given') },
58
+ ];
59
+
60
+ return (
61
+ <MainContainer gradient statusBarStyle="dark-content">
62
+ <Header title={t("profile.ratings")} safeArea={false} />
63
+ <View style={styles.tabsWrap}>
64
+ <SegmentedControl tabs={TABS} value={tab} onChange={setTab} variant="underline" />
65
+ </View>
66
+ <ScrollView contentContainerStyle={styles.scroll} showsVerticalScrollIndicator={false}>
67
+ {isReceived && (
68
+ <Card style={styles.summary} shadow>
69
+ <View style={styles.summaryTopRow}>
70
+ <RNText font="bold" size={36} color={THEME.text}>
71
+ {r.average}
72
+ <RNText size={16} color={THEME.textMuted} font="regular">
73
+ /5
74
+ </RNText>
75
+ </RNText>
76
+ </View>
77
+ <RNText size={12} color={THEME.textMuted} style={styles.ratingsCount}>
78
+ {t("rating.basedOnReviews", { count: r.totalReviews })}
79
+ </RNText>
80
+ <SummaryStars value={r.average} />
81
+ </Card>
82
+ )}
83
+
84
+ <View style={styles.reviewsWrap}>
85
+ {list.map((rev, idx) => (
86
+ <View key={rev.id}>
87
+ <View style={styles.reviewItem}>
88
+ <View style={styles.head}>
89
+ <Avatar name={rev.authorName} size={36} />
90
+ <View style={styles.nameWrap}>
91
+ <RNText font="semibold" size={14} color={THEME.text}>
92
+ {rev.authorName}
93
+ </RNText>
94
+ </View>
95
+ <View style={styles.ratingBox}>
96
+ <StarIcon size={14} color={THEME.star} />
97
+ <RNText font="semibold" size={14} color={THEME.text} style={styles.ratingValue}>
98
+ {rev.rating}.0
99
+ </RNText>
100
+ </View>
101
+ </View>
102
+ <RNText
103
+ size={13}
104
+ color={THEME.textSecondary}
105
+ lineHeight={moderateScale(20)}
106
+ style={styles.comment}
107
+ >
108
+ {`“${rev.comment}”`}
109
+ </RNText>
110
+ </View>
111
+ {idx < list.length - 1 && <View style={styles.divider} />}
112
+ </View>
113
+ ))}
114
+ </View>
115
+ </ScrollView>
116
+ </MainContainer>
117
+ );
118
+ };
119
+
120
+ export default Ratings;
121
+
122
+ const styles = StyleSheet.create({
123
+ summaryStarsRow: { flexDirection: "row" },
124
+ tabsWrap: { paddingHorizontal: SPACING.xl },
125
+ scroll: {
126
+ paddingHorizontal: SPACING.xl,
127
+ paddingBottom: moderateScale(60),
128
+ paddingTop: SPACING.lg,
129
+ },
130
+ summary: {
131
+ padding: SPACING.xl,
132
+ borderRadius: SPACING.radiusLg,
133
+ marginBottom: SPACING.xl,
134
+ },
135
+ summaryTopRow: {
136
+ flexDirection: "row",
137
+ alignItems: "flex-end",
138
+ },
139
+ ratingsCount: {
140
+ marginTop: moderateScale(2),
141
+ marginBottom: SPACING.md,
142
+ },
143
+ reviewsWrap: {},
144
+ reviewItem: {
145
+ paddingVertical: SPACING.md,
146
+ },
147
+ head: {
148
+ flexDirection: "row",
149
+ alignItems: "center",
150
+ },
151
+ nameWrap: {
152
+ flex: 1,
153
+ marginLeft: SPACING.md,
154
+ },
155
+ ratingBox: {
156
+ flexDirection: "row",
157
+ alignItems: "center",
158
+ },
159
+ ratingValue: {
160
+ marginLeft: moderateScale(4),
161
+ },
162
+ comment: {
163
+ marginTop: SPACING.sm,
164
+ },
165
+ divider: {
166
+ height: 1,
167
+ backgroundColor: THEME.border,
168
+ marginVertical: moderateScale(4),
169
+ },
170
+ });