@zezosoft/zezo-ott-react-native-ui-kit 1.1.0 → 1.1.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.
- package/lib/module/Styles/globalStyles.js +0 -5
- package/lib/module/Styles/globalStyles.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +64 -40
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +5 -2
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +17 -11
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +12 -6
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +7 -4
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +133 -86
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +174 -109
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +19 -13
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +54 -36
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +29 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +13 -7
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +33 -21
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +26 -20
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +36 -20
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +152 -0
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +4 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/Button/BackBtn.js +46 -16
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +19 -13
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +19 -13
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +19 -13
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +70 -37
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +40 -32
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +109 -48
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +4 -11
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +105 -43
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +18 -17
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +78 -28
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Content.js +44 -25
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +37 -29
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +70 -41
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +74 -40
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/AboutSection.js +40 -19
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +6 -7
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +2 -2
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +25 -13
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +39 -11
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +84 -77
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/ContentView/components/PlayButton.js +11 -7
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +12 -12
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +12 -7
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/Fallbacks/NoContentFallback.js +27 -22
- package/lib/module/components/Fallbacks/NoContentFallback.js.map +1 -1
- package/lib/module/components/Fallbacks/NotFoundFallback.js +6 -4
- package/lib/module/components/Fallbacks/NotFoundFallback.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +22 -13
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/Three.js +6 -5
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +19 -14
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +46 -31
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Loader/Loader.js +2 -2
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +17 -14
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js +134 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js +154 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js +173 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js +77 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js +132 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js +165 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js +106 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js +124 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +102 -64
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +241 -232
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js +153 -0
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/{Model → components}/Episodes.js +46 -36
- package/lib/module/components/Reels/ReelsSeries/components/Episodes.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js +35 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js +37 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js +55 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js +268 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js +143 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js +56 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js +5 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js +30 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/index.js +7 -0
- package/lib/module/components/Reels/utils/Controls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js +28 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js +27 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js +5 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js.map +1 -0
- package/lib/module/components/Reels/utils/index.js +4 -0
- package/lib/module/components/Reels/utils/index.js.map +1 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js +24 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js.map +1 -0
- package/lib/module/components/Search/One.js +2 -1
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +15 -19
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +97 -62
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +313 -254
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/Text/Text.js +15 -12
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +25 -23
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +23 -18
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +38 -24
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +21 -14
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +30 -21
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +38 -19
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +37 -17
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/View/View.js +7 -4
- package/lib/module/components/View/View.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/index.js +17 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useDebounce.js +25 -6
- package/lib/module/hooks/useDebounce.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -4
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +10 -4
- package/lib/module/hooks/useNavigationMode.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +1 -1
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/hooks/usePrevious.js +30 -0
- package/lib/module/hooks/usePrevious.js.map +1 -0
- package/lib/module/hooks/useSafeCallback.js +33 -0
- package/lib/module/hooks/useSafeCallback.js.map +1 -0
- package/lib/module/hooks/useSkeletonItems.js +33 -0
- package/lib/module/hooks/useSkeletonItems.js.map +1 -0
- package/lib/module/hooks/useSplashCache.js +2 -1
- package/lib/module/hooks/useSplashCache.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +33 -0
- package/lib/module/hooks/useThemeColors.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +24 -15
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useInternalTheme.js +18 -11
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
- package/lib/module/theme/hook/useThemeStatusBar.js +10 -4
- package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -1
- package/lib/module/theme/themes.js +3 -3
- package/lib/typescript/src/Styles/globalStyles.d.ts +0 -5
- package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +0 -15
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +18 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +3 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/BackBtn.d.ts +5 -3
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts +2 -2
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +4 -2
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +2 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +2 -2
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts +2 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts +2 -2
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +2 -2
- package/lib/typescript/src/components/Input/Input.d.ts +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +2 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts +60 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts +16 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts +15 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/{Model → components}/Episodes.d.ts +3 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Episodes.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts +11 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts +10 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts +3 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts +10 -0
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts +5 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts +12 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts +24 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts +3 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts +2 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts +14 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -5
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/index.d.ts +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts +2 -2
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -2
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/View/View.d.ts +2 -0
- package/lib/typescript/src/components/View/View.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +14 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts +12 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts +15 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts +11 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts +27 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Styles/globalStyles.ts +0 -5
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +288 -212
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +11 -4
- package/src/components/Auth/Login/LoginWithEmail.tsx +266 -238
- package/src/components/Auth/Login/LoginWithPhone.tsx +18 -6
- package/src/components/Auth/OTP/OTP.tsx +21 -5
- package/src/components/Auth/QrLogin/QrLogin.tsx +225 -185
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +282 -166
- package/src/components/Auth/SignUp/SignUp.tsx +312 -293
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +186 -131
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +32 -15
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +11 -5
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +34 -18
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +43 -37
- package/src/components/BlogView/BlogView.tsx +66 -30
- package/src/components/BottomSheet/BottomSheet.tsx +195 -0
- package/src/components/BottomSheet/index.ts +2 -0
- package/src/components/Button/BackBtn.tsx +87 -24
- package/src/components/Button/PrimaryBtn.tsx +42 -25
- package/src/components/Button/SecondaryBtn.tsx +41 -25
- package/src/components/Button/TextButton.tsx +54 -32
- package/src/components/Content/Card/Category/Category.tsx +94 -56
- package/src/components/Content/Card/Sliders/Styles/One.tsx +63 -47
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +131 -51
- package/src/components/Content/Card/Styles/RotateInOut.tsx +7 -9
- package/src/components/Content/Card/components/CardPoster.tsx +136 -55
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +58 -38
- package/src/components/Content/Card/components/ThumbnailCard.tsx +122 -47
- package/src/components/Content/Content.tsx +164 -97
- package/src/components/Content/Sections.tsx +99 -43
- package/src/components/ContentView/ContentView.tsx +194 -128
- package/src/components/ContentView/MoreContentList.tsx +215 -151
- package/src/components/ContentView/components/AboutSection.tsx +132 -93
- package/src/components/ContentView/components/CastCard.tsx +148 -138
- package/src/components/ContentView/components/EpisodeCard.tsx +160 -155
- package/src/components/ContentView/components/GenreTags.tsx +68 -53
- package/src/components/ContentView/components/HeroBanner.tsx +326 -284
- package/src/components/ContentView/components/MiniInfo.tsx +181 -159
- package/src/components/ContentView/components/PlayButton.tsx +27 -16
- package/src/components/ContentView/components/Title.tsx +89 -72
- package/src/components/ContentView/components/TrailerButton.tsx +35 -22
- package/src/components/Fallbacks/NoContentFallback.tsx +107 -103
- package/src/components/Fallbacks/NotFoundFallback.tsx +12 -4
- package/src/components/Headers/AppHeader.tsx +42 -26
- package/src/components/Headers/Three.tsx +12 -8
- package/src/components/Headers/Two.tsx +31 -10
- package/src/components/Input/InputOne.tsx +136 -108
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Logo/Logo.tsx +43 -27
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +156 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +234 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +196 -0
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +92 -0
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +163 -0
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +210 -0
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +143 -0
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +154 -0
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +142 -74
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +349 -250
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +184 -0
- package/src/components/Reels/ReelsSeries/{Model → components}/Episodes.tsx +54 -33
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +41 -0
- package/src/components/Reels/ReelsSeries/components/Like.tsx +40 -0
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +79 -0
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +332 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +190 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +80 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +2 -0
- package/src/components/Reels/ReelsSeries/types.ts +13 -2
- package/src/components/Reels/utils/Controls/gestureUtils.ts +42 -0
- package/src/components/Reels/utils/Controls/index.ts +4 -0
- package/src/components/Reels/utils/Controls/overlayUtils.ts +35 -0
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +25 -0
- package/src/components/Reels/utils/Controls/videoRef.ts +4 -0
- package/src/components/Reels/utils/index.ts +1 -0
- package/src/components/Reels/utils/timeoutUtils.ts +29 -0
- package/src/components/Search/One.tsx +2 -4
- package/src/components/Search/components/SearchCard.tsx +19 -13
- package/src/components/Settings/AppSettings.tsx +217 -128
- package/src/components/Subscription/SubOne.tsx +394 -317
- package/src/components/Text/Text.tsx +33 -22
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +129 -102
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +36 -17
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +194 -140
- package/src/components/User/WatchHistory/WatchHistory.tsx +63 -36
- package/src/components/User/WatchLater/WatchLater.tsx +119 -81
- package/src/components/User/components/UserAvatar.tsx +49 -15
- package/src/components/User/components/UserSection.tsx +71 -37
- package/src/components/View/View.tsx +10 -2
- package/src/components/index.ts +1 -1
- package/src/hooks/index.ts +14 -0
- package/src/hooks/useDebounce.ts +25 -6
- package/src/hooks/useKeyboard.ts +12 -5
- package/src/hooks/useNavigationMode.ts +16 -5
- package/src/hooks/usePaginatedSection.ts +1 -1
- package/src/hooks/usePrevious.ts +28 -0
- package/src/hooks/useSafeCallback.ts +43 -0
- package/src/hooks/useSkeletonItems.ts +30 -0
- package/src/hooks/useSplashCache.ts +2 -1
- package/src/hooks/useThemeColors.ts +51 -0
- package/src/theme/ThemeProvider.tsx +33 -11
- package/src/theme/hook/useInternalTheme.ts +19 -13
- package/src/theme/hook/useThemeStatusBar.ts +14 -5
- package/src/theme/themes.ts +3 -3
- package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +0 -212
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js +0 -182
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js +0 -203
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts +0 -9
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts +0 -13
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts +0 -18
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts.map +0 -1
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +0 -242
- package/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.tsx +0 -209
- package/src/components/Reels/ReelsSeries/ReelSeriesOverlay.tsx +0 -185
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
3
|
* @LastModified Mon 30 Jun 2025 at 11:30 PM
|
|
4
4
|
*/
|
|
5
|
-
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
5
|
+
import React, { memo, useCallback, useMemo, useState, useRef } from 'react';
|
|
6
|
+
import { InteractionManager } from 'react-native';
|
|
7
|
+
import { useSkeletonItems } from '../../../../../hooks/useSkeletonItems';
|
|
6
8
|
import {
|
|
7
9
|
View,
|
|
8
10
|
TouchableOpacity,
|
|
@@ -27,6 +29,48 @@ import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
|
27
29
|
const FULL_WIDTH = Display.fullWidth;
|
|
28
30
|
const FULL_HEIGHT = FULL_WIDTH * (9 / 16);
|
|
29
31
|
|
|
32
|
+
// Memoized carousel item component for better performance
|
|
33
|
+
type CarouselItemProps = {
|
|
34
|
+
item: IContentData;
|
|
35
|
+
onPressItem?: (item: IContentData) => void;
|
|
36
|
+
appliedTheme: any;
|
|
37
|
+
gradientConfig: {
|
|
38
|
+
colors: [string, string];
|
|
39
|
+
start: { x: number; y: number };
|
|
40
|
+
end: { x: number; y: number };
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const CarouselItem = memo<CarouselItemProps>(
|
|
45
|
+
({ item, onPressItem, appliedTheme, gradientConfig }) => (
|
|
46
|
+
<TouchableOpacity
|
|
47
|
+
activeOpacity={0.85}
|
|
48
|
+
onPress={() => onPressItem?.(item)}
|
|
49
|
+
style={styles.itemWrapper}
|
|
50
|
+
accessibilityRole="button"
|
|
51
|
+
accessibilityLabel={`View ${item.name}`}
|
|
52
|
+
>
|
|
53
|
+
<RentOrBuyIcon
|
|
54
|
+
theme={appliedTheme}
|
|
55
|
+
content_offering_type={item.content_offering_type}
|
|
56
|
+
/>
|
|
57
|
+
<ThumbnailCard
|
|
58
|
+
thumbnailUri={item.thumbnail}
|
|
59
|
+
theme={appliedTheme}
|
|
60
|
+
isLoading={false}
|
|
61
|
+
wrapperStyle={styles.image}
|
|
62
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
63
|
+
/>
|
|
64
|
+
<LinearGradient
|
|
65
|
+
colors={gradientConfig.colors}
|
|
66
|
+
start={gradientConfig.start}
|
|
67
|
+
end={gradientConfig.end}
|
|
68
|
+
style={styles.gradientBottomOverlay}
|
|
69
|
+
/>
|
|
70
|
+
</TouchableOpacity>
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
|
|
30
74
|
type SliderTwoProps = {
|
|
31
75
|
data: ISectionContent | null;
|
|
32
76
|
onPressItem?: (item: IContentData) => void;
|
|
@@ -51,7 +95,48 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
51
95
|
() => [appliedTheme.colors.primary, appliedTheme.colors.primary],
|
|
52
96
|
[appliedTheme.colors.primary]
|
|
53
97
|
);
|
|
54
|
-
|
|
98
|
+
// Debounce snap handler to prevent stuttering
|
|
99
|
+
const snapTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
100
|
+
const handleSnapToItem = useCallback((i: number) => {
|
|
101
|
+
if (snapTimeoutRef.current) {
|
|
102
|
+
clearTimeout(snapTimeoutRef.current);
|
|
103
|
+
}
|
|
104
|
+
snapTimeoutRef.current = setTimeout(() => {
|
|
105
|
+
InteractionManager.runAfterInteractions(() => {
|
|
106
|
+
setActiveIndex(i);
|
|
107
|
+
});
|
|
108
|
+
}, 50);
|
|
109
|
+
}, []);
|
|
110
|
+
|
|
111
|
+
// Memoize skeleton items
|
|
112
|
+
const skeletonItems = useSkeletonItems(skeletonCount);
|
|
113
|
+
|
|
114
|
+
// Memoize indicator array
|
|
115
|
+
const indicatorArray = useMemo(
|
|
116
|
+
() => Array.from({ length: contentData.length }, (_, i) => i),
|
|
117
|
+
[contentData.length]
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
// Memoize carousel data
|
|
121
|
+
const carouselData = useMemo(
|
|
122
|
+
() => (isLoading ? skeletonItems : contentData),
|
|
123
|
+
[isLoading, skeletonItems, contentData]
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
// Memoize gradient configuration
|
|
127
|
+
const gradientConfig = useMemo(
|
|
128
|
+
() => ({
|
|
129
|
+
colors: ['transparent', 'rgba(0,0,0,0.7)'] as [string, string],
|
|
130
|
+
start: { x: 0.5, y: 0 },
|
|
131
|
+
end: { x: 0.5, y: 1 },
|
|
132
|
+
}),
|
|
133
|
+
[]
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// Memoize pan gesture handler for smooth scrolling
|
|
137
|
+
const configurePanGesture = useCallback((gesture: any) => {
|
|
138
|
+
gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5]);
|
|
139
|
+
}, []);
|
|
55
140
|
|
|
56
141
|
const renderSkeletonItem = useCallback(
|
|
57
142
|
() => (
|
|
@@ -69,33 +154,44 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
69
154
|
|
|
70
155
|
const renderCarouselItem = useCallback(
|
|
71
156
|
({ item }: { item: IContentData }) => (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
>
|
|
79
|
-
<RentOrBuyIcon
|
|
80
|
-
theme={appliedTheme}
|
|
81
|
-
content_offering_type={item.content_offering_type}
|
|
82
|
-
/>
|
|
83
|
-
<ThumbnailCard
|
|
84
|
-
thumbnailUri={item.thumbnail}
|
|
85
|
-
theme={appliedTheme}
|
|
86
|
-
isLoading={isLoading}
|
|
87
|
-
wrapperStyle={styles.image}
|
|
88
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
89
|
-
/>
|
|
90
|
-
<LinearGradient
|
|
91
|
-
colors={['transparent', 'rgba(0,0,0,0.7)']}
|
|
92
|
-
start={{ x: 0.5, y: 0 }}
|
|
93
|
-
end={{ x: 0.5, y: 1 }}
|
|
94
|
-
style={styles.gradientBottomOverlay}
|
|
95
|
-
/>
|
|
96
|
-
</TouchableOpacity>
|
|
157
|
+
<CarouselItem
|
|
158
|
+
item={item}
|
|
159
|
+
onPressItem={onPressItem}
|
|
160
|
+
appliedTheme={appliedTheme}
|
|
161
|
+
gradientConfig={gradientConfig}
|
|
162
|
+
/>
|
|
97
163
|
),
|
|
98
|
-
[appliedTheme,
|
|
164
|
+
[appliedTheme, onPressItem, gradientConfig]
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
// Memoize renderItem to prevent switching functions
|
|
168
|
+
const renderItem = useMemo(
|
|
169
|
+
() => (isLoading ? renderSkeletonItem : renderCarouselItem),
|
|
170
|
+
[isLoading, renderSkeletonItem, renderCarouselItem]
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
// Memoize carousel props for smooth scrolling
|
|
174
|
+
const carouselProps = useMemo(
|
|
175
|
+
() => ({
|
|
176
|
+
width: FULL_WIDTH,
|
|
177
|
+
height: FULL_HEIGHT,
|
|
178
|
+
autoPlay: !isLoading && contentData.length > 1,
|
|
179
|
+
loop: !isLoading && contentData.length > 1,
|
|
180
|
+
scrollAnimationDuration: 300, // Reduced for smoother scrolling
|
|
181
|
+
autoPlayInterval: 3000,
|
|
182
|
+
windowSize: 2, // Reduced window size for better performance
|
|
183
|
+
enabled: true,
|
|
184
|
+
}),
|
|
185
|
+
[isLoading, contentData.length]
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// Memoize inactive indicator style
|
|
189
|
+
const inactiveIndicatorStyle = useMemo(
|
|
190
|
+
() => [
|
|
191
|
+
styles.inactiveIndicator,
|
|
192
|
+
{ backgroundColor: appliedTheme.colors.onSurface },
|
|
193
|
+
],
|
|
194
|
+
[appliedTheme.colors.onSurface]
|
|
99
195
|
);
|
|
100
196
|
|
|
101
197
|
const renderIndicator = useCallback(
|
|
@@ -121,12 +217,7 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
121
217
|
style={styles.activeIndicator}
|
|
122
218
|
/>
|
|
123
219
|
) : (
|
|
124
|
-
<View
|
|
125
|
-
style={[
|
|
126
|
-
styles.inactiveIndicator,
|
|
127
|
-
{ backgroundColor: appliedTheme.colors.onSurface },
|
|
128
|
-
]}
|
|
129
|
-
/>
|
|
220
|
+
<View style={inactiveIndicatorStyle} />
|
|
130
221
|
)}
|
|
131
222
|
</View>
|
|
132
223
|
),
|
|
@@ -134,7 +225,7 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
134
225
|
isLoading,
|
|
135
226
|
appliedTheme.colors.skeletonBaseColor,
|
|
136
227
|
appliedTheme.colors.skeletonHighlightColor,
|
|
137
|
-
|
|
228
|
+
inactiveIndicatorStyle,
|
|
138
229
|
activeIndex,
|
|
139
230
|
gradientColors,
|
|
140
231
|
]
|
|
@@ -155,26 +246,15 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
155
246
|
accessibilityHint={accessibilityHint}
|
|
156
247
|
>
|
|
157
248
|
<Carousel
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
loop={!isLoading && contentData.length > 1}
|
|
162
|
-
scrollAnimationDuration={1000}
|
|
163
|
-
autoPlayInterval={3000}
|
|
164
|
-
data={
|
|
165
|
-
isLoading
|
|
166
|
-
? (Array.from({ length: skeletonCount }) as IContentData[])
|
|
167
|
-
: contentData
|
|
168
|
-
}
|
|
169
|
-
renderItem={isLoading ? renderSkeletonItem : renderCarouselItem}
|
|
249
|
+
{...carouselProps}
|
|
250
|
+
data={carouselData}
|
|
251
|
+
renderItem={renderItem}
|
|
170
252
|
onSnapToItem={handleSnapToItem}
|
|
171
|
-
onConfigurePanGesture={
|
|
172
|
-
gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5])
|
|
173
|
-
}
|
|
253
|
+
onConfigurePanGesture={configurePanGesture}
|
|
174
254
|
/>
|
|
175
255
|
<View style={styles.indicatorContainer}>
|
|
176
256
|
<View style={styles.indicator}>
|
|
177
|
-
{
|
|
257
|
+
{indicatorArray.map((i) => renderIndicator(0, i))}
|
|
178
258
|
</View>
|
|
179
259
|
</View>
|
|
180
260
|
</View>
|
|
@@ -24,6 +24,7 @@ import CardPoster from '../components/CardPoster';
|
|
|
24
24
|
import NavigateToMore from '../components/NavigateToMore';
|
|
25
25
|
|
|
26
26
|
import { usePaginatedSection } from '../../../../hooks/usePaginatedSection';
|
|
27
|
+
import { useSkeletonItems } from '../../../../hooks/useSkeletonItems';
|
|
27
28
|
import type {
|
|
28
29
|
IGetSectionData,
|
|
29
30
|
ISectionContent,
|
|
@@ -149,13 +150,11 @@ const RotateCarousel: React.FC<Props> = ({
|
|
|
149
150
|
);
|
|
150
151
|
|
|
151
152
|
// Memoized skeleton items
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}));
|
|
158
|
-
}, [isLoading, isPaginating, skeletonCount]);
|
|
153
|
+
const skeletonCountMemo = useMemo(
|
|
154
|
+
() => (isLoading ? skeletonCount : isPaginating ? 1 : 0),
|
|
155
|
+
[isLoading, isPaginating, skeletonCount]
|
|
156
|
+
);
|
|
157
|
+
const skeletonItems = useSkeletonItems(skeletonCountMemo);
|
|
159
158
|
|
|
160
159
|
// Optimized finalData to avoid unnecessary spread
|
|
161
160
|
const finalData = useMemo(
|
|
@@ -167,7 +166,6 @@ const RotateCarousel: React.FC<Props> = ({
|
|
|
167
166
|
: data,
|
|
168
167
|
[isLoading, data, skeletonItems]
|
|
169
168
|
);
|
|
170
|
-
|
|
171
169
|
// Debounced loadMoreData to prevent excessive calls
|
|
172
170
|
const debouncedLoadMore = useMemo(
|
|
173
171
|
() =>
|
|
@@ -297,7 +295,7 @@ const RotateCarousel: React.FC<Props> = ({
|
|
|
297
295
|
data={finalData as any}
|
|
298
296
|
vertical={false}
|
|
299
297
|
renderItem={renderItem}
|
|
300
|
-
firstItem={
|
|
298
|
+
firstItem={2}
|
|
301
299
|
inactiveSlideOpacity={0.6}
|
|
302
300
|
inactiveSlideScale={0.9}
|
|
303
301
|
sliderWidth={width}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @lastModified Sat 25 Oct 2025 at 04:01 PM
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useState, useEffect, useMemo } from 'react';
|
|
6
|
+
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
7
7
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
8
8
|
import FastImage, {
|
|
9
9
|
type ResizeMode,
|
|
@@ -17,6 +17,9 @@ import type { ITheme } from '../../../../theme/themes';
|
|
|
17
17
|
import RentOrBuyIcon from './RentOrBuyIcon';
|
|
18
18
|
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
19
19
|
|
|
20
|
+
// Module-level cache to track successfully loaded images
|
|
21
|
+
const loadedImageCache = new Set<string>();
|
|
22
|
+
|
|
20
23
|
export type CardPosterProps = {
|
|
21
24
|
content_offering_type?: IContentData['content_offering_type'];
|
|
22
25
|
posterUri: string;
|
|
@@ -50,19 +53,51 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
50
53
|
);
|
|
51
54
|
}, [posterUri]);
|
|
52
55
|
|
|
56
|
+
// Reset image loading state when isLoading prop changes
|
|
53
57
|
useEffect(() => {
|
|
54
|
-
if (
|
|
58
|
+
if (isLoading) {
|
|
55
59
|
setImageLoading(true);
|
|
56
60
|
setImageError(false);
|
|
57
|
-
|
|
61
|
+
}
|
|
62
|
+
}, [isLoading]);
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (hasValidPoster) {
|
|
66
|
+
// Check if this image was already loaded successfully before
|
|
67
|
+
const isAlreadyLoaded = loadedImageCache.has(posterUri);
|
|
68
|
+
|
|
69
|
+
if (isAlreadyLoaded) {
|
|
70
|
+
// Image was loaded before, skip loading state
|
|
71
|
+
setImageLoading(false);
|
|
72
|
+
setImageError(false);
|
|
73
|
+
} else {
|
|
74
|
+
// Image not loaded before, show loading
|
|
75
|
+
setImageLoading(true);
|
|
76
|
+
setImageError(false);
|
|
77
|
+
FastImage.preload([{ uri: posterUri }]);
|
|
78
|
+
}
|
|
58
79
|
} else {
|
|
59
80
|
setImageLoading(false);
|
|
60
81
|
setImageError(true);
|
|
61
82
|
}
|
|
62
83
|
}, [posterUri, hasValidPoster]);
|
|
63
84
|
|
|
64
|
-
const showSkeleton =
|
|
65
|
-
isLoading || (imageLoading && !imageError && hasValidPoster)
|
|
85
|
+
const showSkeleton = useMemo(
|
|
86
|
+
() => isLoading || (imageLoading && !imageError && hasValidPoster),
|
|
87
|
+
[isLoading, imageLoading, imageError, hasValidPoster]
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Memoize theme colors
|
|
91
|
+
const themeColors = useMemo(
|
|
92
|
+
() => ({
|
|
93
|
+
background: theme.colors.background,
|
|
94
|
+
skeletonBaseColor: theme.colors.skeletonBaseColor,
|
|
95
|
+
skeletonHighlightColor: theme.colors.skeletonHighlightColor,
|
|
96
|
+
error: theme.colors.error,
|
|
97
|
+
errorContainer: theme.colors.errorContainer,
|
|
98
|
+
}),
|
|
99
|
+
[theme.colors]
|
|
100
|
+
);
|
|
66
101
|
|
|
67
102
|
const fallbackImageStyle: ImageStyle = useMemo(
|
|
68
103
|
() => ({
|
|
@@ -76,14 +111,90 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
76
111
|
[borderRadius]
|
|
77
112
|
);
|
|
78
113
|
|
|
114
|
+
// Memoize FastImage source
|
|
115
|
+
const imageSource = useMemo(
|
|
116
|
+
() => ({
|
|
117
|
+
uri: posterUri,
|
|
118
|
+
cache: FastImage.cacheControl.immutable,
|
|
119
|
+
priority: FastImage.priority.normal,
|
|
120
|
+
}),
|
|
121
|
+
[posterUri]
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
// Memoize callback handlers
|
|
125
|
+
const handleLoadStart = useCallback(() => {
|
|
126
|
+
// Only set loading if image is not already in cache
|
|
127
|
+
if (!loadedImageCache.has(posterUri)) {
|
|
128
|
+
setImageLoading(true);
|
|
129
|
+
setImageError(false);
|
|
130
|
+
}
|
|
131
|
+
}, [posterUri]);
|
|
132
|
+
|
|
133
|
+
const handleLoad = useCallback(() => {
|
|
134
|
+
setImageLoading(false);
|
|
135
|
+
setImageError(false);
|
|
136
|
+
// Add to cache when successfully loaded
|
|
137
|
+
loadedImageCache.add(posterUri);
|
|
138
|
+
}, [posterUri]);
|
|
139
|
+
|
|
140
|
+
const handleError = useCallback(() => {
|
|
141
|
+
setImageLoading(false);
|
|
142
|
+
setImageError(true);
|
|
143
|
+
}, []);
|
|
144
|
+
|
|
145
|
+
// Memoize wrapper style
|
|
146
|
+
const wrapperStyle = useMemo(
|
|
147
|
+
() => [
|
|
148
|
+
styles.posterWrapper,
|
|
149
|
+
{ borderRadius, backgroundColor: themeColors.background },
|
|
150
|
+
posterWrapperStyle,
|
|
151
|
+
],
|
|
152
|
+
[borderRadius, themeColors.background, posterWrapperStyle]
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// Memoize skeleton wrapper style
|
|
156
|
+
const skeletonWrapperStyle = useMemo(
|
|
157
|
+
() => [styles.skeletonWrapper, { borderRadius }],
|
|
158
|
+
[borderRadius]
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// Memoize skeleton item style
|
|
162
|
+
const skeletonItemStyle = useMemo(
|
|
163
|
+
() => [styles.skeleton, { borderRadius }],
|
|
164
|
+
[borderRadius]
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
// Memoize image style array
|
|
168
|
+
const imageStyleArray = useMemo(
|
|
169
|
+
() => [
|
|
170
|
+
fallbackImageStyle,
|
|
171
|
+
showSkeleton ? styles.hidden : styles.visible,
|
|
172
|
+
imageStyle,
|
|
173
|
+
],
|
|
174
|
+
[fallbackImageStyle, showSkeleton, imageStyle]
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
// Memoize fallback wrapper style
|
|
178
|
+
const fallbackWrapperStyle = useMemo(
|
|
179
|
+
() => [
|
|
180
|
+
styles.fallbackWrapper,
|
|
181
|
+
{
|
|
182
|
+
borderRadius,
|
|
183
|
+
backgroundColor: themeColors.background,
|
|
184
|
+
borderColor: themeColors.error,
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
[borderRadius, themeColors.background, themeColors.error]
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// Memoize fallback inner style
|
|
191
|
+
const fallbackInnerStyle = useMemo(
|
|
192
|
+
() => [styles.fallback, { backgroundColor: themeColors.errorContainer }],
|
|
193
|
+
[themeColors.errorContainer]
|
|
194
|
+
);
|
|
195
|
+
|
|
79
196
|
return (
|
|
80
|
-
<View
|
|
81
|
-
style={[
|
|
82
|
-
styles.posterWrapper,
|
|
83
|
-
{ borderRadius, backgroundColor: theme.colors.background },
|
|
84
|
-
posterWrapperStyle,
|
|
85
|
-
]}
|
|
86
|
-
>
|
|
197
|
+
<View style={wrapperStyle}>
|
|
87
198
|
{!showSkeleton && content_offering_type && (
|
|
88
199
|
<RentOrBuyIcon
|
|
89
200
|
theme={theme}
|
|
@@ -92,60 +203,30 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
92
203
|
/>
|
|
93
204
|
)}
|
|
94
205
|
{showSkeleton && (
|
|
95
|
-
<View style={
|
|
206
|
+
<View style={skeletonWrapperStyle}>
|
|
96
207
|
<SkeletonPlaceholder
|
|
97
|
-
backgroundColor={
|
|
98
|
-
highlightColor={
|
|
208
|
+
backgroundColor={themeColors.skeletonBaseColor}
|
|
209
|
+
highlightColor={themeColors.skeletonHighlightColor}
|
|
99
210
|
>
|
|
100
|
-
<SkeletonPlaceholder.Item
|
|
101
|
-
style={[styles.skeleton, { borderRadius }]}
|
|
102
|
-
/>
|
|
211
|
+
<SkeletonPlaceholder.Item style={skeletonItemStyle} />
|
|
103
212
|
</SkeletonPlaceholder>
|
|
104
213
|
</View>
|
|
105
214
|
)}
|
|
106
215
|
{hasValidPoster && (
|
|
107
216
|
<FastImage
|
|
108
|
-
source={
|
|
109
|
-
|
|
110
|
-
cache: FastImage.cacheControl.immutable,
|
|
111
|
-
priority: FastImage.priority.normal,
|
|
112
|
-
}}
|
|
113
|
-
style={[
|
|
114
|
-
fallbackImageStyle,
|
|
115
|
-
showSkeleton ? styles.hidden : styles.visible,
|
|
116
|
-
imageStyle,
|
|
117
|
-
]}
|
|
217
|
+
source={imageSource}
|
|
218
|
+
style={imageStyleArray}
|
|
118
219
|
resizeMode={resizeMode}
|
|
119
|
-
onLoadStart={
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}}
|
|
123
|
-
onLoad={() => setImageLoading(false)}
|
|
124
|
-
onError={() => {
|
|
125
|
-
setImageLoading(false);
|
|
126
|
-
setImageError(true);
|
|
127
|
-
}}
|
|
220
|
+
onLoadStart={handleLoadStart}
|
|
221
|
+
onLoad={handleLoad}
|
|
222
|
+
onError={handleError}
|
|
128
223
|
/>
|
|
129
224
|
)}
|
|
130
225
|
{!showSkeleton && (!hasValidPoster || imageError) && (
|
|
131
|
-
<View
|
|
132
|
-
style={
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
borderRadius,
|
|
136
|
-
backgroundColor: theme.colors.background,
|
|
137
|
-
borderColor: theme.colors.error,
|
|
138
|
-
},
|
|
139
|
-
]}
|
|
140
|
-
>
|
|
141
|
-
<View
|
|
142
|
-
style={[
|
|
143
|
-
styles.fallback,
|
|
144
|
-
{ backgroundColor: theme.colors.errorContainer },
|
|
145
|
-
]}
|
|
146
|
-
>
|
|
147
|
-
<ImageOff size={scale(18)} color={theme.colors.error} />
|
|
148
|
-
<Text style={styles.fallbackText} color={theme.colors.error}>
|
|
226
|
+
<View style={fallbackWrapperStyle}>
|
|
227
|
+
<View style={fallbackInnerStyle}>
|
|
228
|
+
<ImageOff size={scale(18)} color={themeColors.error} />
|
|
229
|
+
<Text style={styles.fallbackText} color={themeColors.error}>
|
|
149
230
|
Image Failed
|
|
150
231
|
</Text>
|
|
151
232
|
</View>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import Svg, { Path } from 'react-native-svg';
|
|
4
4
|
import { scale } from 'react-native-size-matters';
|
|
@@ -13,30 +13,34 @@ interface RentOrBuyIconProps {
|
|
|
13
13
|
size?: number;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const PremiumIcon: React.FC<{ fillColor: string }> = (
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
const PremiumIcon: React.FC<{ fillColor: string }> = React.memo(
|
|
17
|
+
({ fillColor }) => (
|
|
18
|
+
<Svg viewBox="0 0 1024 1024" width="100%" height="100%">
|
|
19
|
+
<Path
|
|
20
|
+
transform="translate(507,81)"
|
|
21
|
+
d="M0 0l19 1 15 3 15 6 11 6 13 10 11 11 9 13 8 15 5 17 2 14v15l-3 17-5 15-7 14-9 12-9 10-15 11-16 8-10 4h-3l13 49 12 36 9 24 14 30 9 17 13 21 10 13 11 13 7 8 11 9 10 8 12 7 16 7 21 5h28l16-4 15-5 22-12 12-9 10-8 10-9 9-9 2-3h2l2-4 8-9 13-18 7-10 9-15 11-19 13-27 5-13-5-2-13-12-7-8-7-11-6-15-2-11v-22l5-19 8-15 11-13 10-9 14-8 15-5 14-2h10l14 2 15 5 12 7 11 9 9 10 8 13 5 12 3 7v37l-2 2-4 11-7 13-9 11-7 7-16 10-16 6-10 2-4 16-10 53-11 57-22 115-14 73-11 56-7 37-3 4h-719l-3-9-14-72-23-120-17-88-23-120-1-2-14-3-12-5-10-6-11-9-11-13-9-17-4-12v-35h2l2-9 8-16 4-6 9-10 10-9 15-8 17-5 19-1 15 2 15 5 15 9 13 12 10 14 5 11 4 13 1 6v18l-3 16-7 16-6 9-11 13-13 9 4 10 17 35 10 17 12 19 13 17 8 10 14 15 11 11 14 11 13 9 21 11 19 6 10 2h27l25-6 17-9 9-5 13-11 8-7 5-5 9-10 13-17 13-22 9-16 13-28 8-21 12-35 11-41 3-13-19-8-12-7-10-8-13-13-10-15-7-16-4-15-1-8v-18l3-18 6-16 8-15 9-11 7-8 13-10 12-7 16-6 15-3z"
|
|
22
|
+
fill={fillColor}
|
|
23
|
+
/>
|
|
24
|
+
<Path
|
|
25
|
+
transform="translate(785,818)"
|
|
26
|
+
d="M0 0l64 1 15 4 13 8 9 8 9 13 5 13 2 15-2 16-5 12-6 10-9 10-11 7-12 5-10 2h-672l-15-4-12-7-10-9-9-13-5-13-2-11v-9l3-15 8-16 11-12 10-7 11-5 10-2z"
|
|
27
|
+
fill={fillColor}
|
|
28
|
+
/>
|
|
29
|
+
</Svg>
|
|
30
|
+
)
|
|
29
31
|
);
|
|
30
32
|
|
|
31
|
-
const BuyOrRentIcon: React.FC<{ fillColor: string }> = (
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
const BuyOrRentIcon: React.FC<{ fillColor: string }> = React.memo(
|
|
34
|
+
({ fillColor }) => (
|
|
35
|
+
<Svg fill="none" viewBox="5 5 18 18" width="100%" height="100%">
|
|
36
|
+
<Path
|
|
37
|
+
fill={fillColor}
|
|
38
|
+
fillRule="evenodd"
|
|
39
|
+
clipRule="evenodd"
|
|
40
|
+
d="M9.834 9.835H11.2c0-.108-.002-.215-.003-.319-.014-1.424-.024-2.412 2.734-2.412 2.504 0 2.732.453 2.732 2.73l1.365.001c0-3.871-.91-4.099-4.097-4.099h-.21c-3.225-.002-3.709-.002-3.887 4.1zm-.153-.001H7.712a1.976 1.976 0 00-1.976 1.976v6.064a4.252 4.252 0 004.252 4.252h7.886a4.252 4.252 0 004.252-4.252V11.81a1.976 1.976 0 00-1.976-1.976H18.18a.153.153 0 00-.153.153v3.716a.683.683 0 01-1.365 0V9.987a.153.153 0 00-.153-.153h-5.158a.153.153 0 00-.152.153v3.716a.683.683 0 01-1.366 0V9.987a.153.153 0 00-.153-.153z"
|
|
41
|
+
/>
|
|
42
|
+
</Svg>
|
|
43
|
+
)
|
|
40
44
|
);
|
|
41
45
|
|
|
42
46
|
const RentOrBuyIcon: React.FC<RentOrBuyIconProps> = ({
|
|
@@ -46,14 +50,22 @@ const RentOrBuyIcon: React.FC<RentOrBuyIconProps> = ({
|
|
|
46
50
|
position = 'topLeft',
|
|
47
51
|
size = 22,
|
|
48
52
|
}) => {
|
|
49
|
-
|
|
53
|
+
const typeUpper = useMemo(
|
|
54
|
+
() => content_offering_type?.toUpperCase(),
|
|
55
|
+
[content_offering_type]
|
|
56
|
+
);
|
|
50
57
|
|
|
51
|
-
const
|
|
52
|
-
|
|
58
|
+
const isValidType = useMemo(
|
|
59
|
+
() => typeUpper && ['PREMIUM', 'BUY_OR_RENT'].includes(typeUpper),
|
|
60
|
+
[typeUpper]
|
|
61
|
+
);
|
|
53
62
|
|
|
54
|
-
const fillColor =
|
|
63
|
+
const fillColor = useMemo(
|
|
64
|
+
() => theme?.colors.premiumIcon || '#CA091E',
|
|
65
|
+
[theme?.colors.premiumIcon]
|
|
66
|
+
);
|
|
55
67
|
|
|
56
|
-
const positionStyle
|
|
68
|
+
const positionStyle = useMemo<ViewStyle>(() => {
|
|
57
69
|
switch (position) {
|
|
58
70
|
case 'topLeft':
|
|
59
71
|
return { top: 6, left: 6 };
|
|
@@ -66,18 +78,26 @@ const RentOrBuyIcon: React.FC<RentOrBuyIconProps> = ({
|
|
|
66
78
|
default:
|
|
67
79
|
return { top: 6, left: 6 };
|
|
68
80
|
}
|
|
69
|
-
})
|
|
81
|
+
}, [position]);
|
|
82
|
+
|
|
83
|
+
const IconComponent = useMemo(
|
|
84
|
+
() => (typeUpper === 'PREMIUM' ? PremiumIcon : BuyOrRentIcon),
|
|
85
|
+
[typeUpper]
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const containerStyle = useMemo(
|
|
89
|
+
() => [
|
|
90
|
+
styles.container,
|
|
91
|
+
{ width: size, height: size },
|
|
92
|
+
style || positionStyle,
|
|
93
|
+
],
|
|
94
|
+
[size, style, positionStyle]
|
|
95
|
+
);
|
|
70
96
|
|
|
71
|
-
|
|
97
|
+
if (!content_offering_type || !isValidType) return null;
|
|
72
98
|
|
|
73
99
|
return (
|
|
74
|
-
<View
|
|
75
|
-
style={[
|
|
76
|
-
styles.container,
|
|
77
|
-
{ width: size, height: size },
|
|
78
|
-
style || positionStyle,
|
|
79
|
-
]}
|
|
80
|
-
>
|
|
100
|
+
<View style={containerStyle}>
|
|
81
101
|
<View style={styles.iconWrapper}>
|
|
82
102
|
<IconComponent fillColor={fillColor} />
|
|
83
103
|
</View>
|
|
@@ -85,7 +105,7 @@ const RentOrBuyIcon: React.FC<RentOrBuyIconProps> = ({
|
|
|
85
105
|
);
|
|
86
106
|
};
|
|
87
107
|
|
|
88
|
-
export default RentOrBuyIcon;
|
|
108
|
+
export default React.memo(RentOrBuyIcon);
|
|
89
109
|
|
|
90
110
|
const styles = StyleSheet.create({
|
|
91
111
|
container: {
|