@zezosoft/zezo-ott-react-native-ui-kit 1.1.5 → 1.1.7
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/components/Content/Card/Sliders/Styles/Three.js +5 -4
- package/lib/module/components/Content/Card/Sliders/Styles/Three.js.map +1 -1
- package/lib/module/components/Headers/Four.js +1 -1
- package/lib/module/components/Headers/Three.js +2 -1
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Three.d.ts.map +1 -1
- package/package.json +2 -14
- package/src/Styles/globalStyles.ts +0 -70
- package/src/assets/animations/135037-payment-processing-error.json +0 -1347
- package/src/assets/animations/7227-vui-animation.json +0 -3377
- package/src/assets/animations/Failed.json +0 -2103
- package/src/assets/animations/Pending.json +0 -522
- package/src/assets/animations/Successful.json +0 -2289
- package/src/assets/animations/heart.json +0 -788
- package/src/assets/animations/succesfull-payment.json +0 -2379
- package/src/assets/animations/voice-icon.json +0 -542
- package/src/assets/img/back.png +0 -0
- package/src/assets/img/bottom-panel.png +0 -0
- package/src/assets/img/camera.png +0 -0
- package/src/assets/img/camera2.png +0 -0
- package/src/assets/img/home.png +0 -0
- package/src/assets/img/lock.png +0 -0
- package/src/assets/img/play.png +0 -0
- package/src/assets/img/profile.jpg +0 -0
- package/src/assets/img/qr-code.png +0 -0
- package/src/assets/img/shadow.png +0 -0
- package/src/assets/img/shadow2.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/svg/Account.svg +0 -4
- package/src/assets/svg/Favourite.svg +0 -14
- package/src/assets/svg/Upcoming.svg +0 -4
- package/src/assets/svg/content-error.svg +0 -28
- package/src/assets/svg/download.svg +0 -3
- package/src/assets/svg/eye-off.svg +0 -10
- package/src/assets/svg/favorites.svg +0 -3
- package/src/assets/svg/h.svg +0 -4
- package/src/assets/svg/home.svg +0 -5
- package/src/assets/svg/home1.svg +0 -3
- package/src/assets/svg/menu-bar.svg +0 -4
- package/src/assets/svg/my-space.svg +0 -14
- package/src/assets/svg/play-icon-with-bg.svg +0 -5
- package/src/assets/svg/profile.svg +0 -4
- package/src/assets/svg/search.svg +0 -5
- package/src/assets/svg/search1.svg +0 -4
- package/src/assets/svg/server-error.svg +0 -139
- package/src/components/Account/Account.tsx +0 -367
- package/src/components/Account/index.ts +0 -1
- package/src/components/Alert/AlertDialog.tsx +0 -247
- package/src/components/Alert/UAAlert.tsx +0 -170
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +0 -419
- package/src/components/Auth/One/ForgotPassword/ForgotPassword.tsx +0 -324
- package/src/components/Auth/One/Login/LoginWithEmail.tsx +0 -455
- package/src/components/Auth/One/Login/LoginWithPhone.tsx +0 -306
- package/src/components/Auth/One/OTP/OTP.tsx +0 -465
- package/src/components/Auth/One/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/One/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/One/SignUp/SignUp.tsx +0 -479
- package/src/components/Auth/One/SplashScreen/SplashScreen.tsx +0 -249
- package/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.tsx +0 -103
- package/src/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -174
- package/src/components/Auth/One/index.ts +0 -24
- package/src/components/Auth/Two/AuthHeader/AuthHeader.tsx +0 -108
- package/src/components/Auth/Two/ForgotPassword/ForgotPassword.tsx +0 -335
- package/src/components/Auth/Two/Login/AuthLoginShell.tsx +0 -173
- package/src/components/Auth/Two/Login/LoginWithEmail.tsx +0 -279
- package/src/components/Auth/Two/Login/LoginWithPhone.tsx +0 -188
- package/src/components/Auth/Two/OTP/OTP.tsx +0 -465
- package/src/components/Auth/Two/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/Two/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/Two/SignUp/SignUp.tsx +0 -472
- package/src/components/Auth/Two/SplashScreen/SplashScreen.tsx +0 -248
- package/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.tsx +0 -92
- package/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -178
- package/src/components/Auth/Two/index.ts +0 -28
- package/src/components/Auth/index.ts +0 -11
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +0 -174
- package/src/components/BackgroundLayout/BackgroundLayoutOne.tsx +0 -56
- package/src/components/BlogView/BlogView.tsx +0 -276
- package/src/components/BlogView/index.ts +0 -8
- package/src/components/BlurView/BlurView.tsx +0 -199
- package/src/components/BlurView/index.ts +0 -7
- package/src/components/BottomSheet/BottomSheet.tsx +0 -200
- package/src/components/BottomSheet/BottomSheetOne.tsx +0 -220
- package/src/components/BottomSheet/index.ts +0 -4
- package/src/components/Button/BackBtn.tsx +0 -168
- package/src/components/Button/MenuBtn.tsx +0 -229
- package/src/components/Button/PrimaryBtn.tsx +0 -134
- package/src/components/Button/SecondaryBtn.tsx +0 -132
- package/src/components/Button/TextButton.tsx +0 -145
- package/src/components/Button/index.ts +0 -18
- package/src/components/Content/Card/Category/Category.tsx +0 -436
- package/src/components/Content/Card/Category/CategroyTwo.tsx +0 -429
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +0 -624
- package/src/components/Content/Card/Sliders/Styles/One.tsx +0 -490
- package/src/components/Content/Card/Sliders/Styles/Three.tsx +0 -935
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +0 -391
- package/src/components/Content/Card/Sliders/index.ts +0 -17
- package/src/components/Content/Card/Styles/Five.tsx +0 -385
- package/src/components/Content/Card/Styles/Four.tsx +0 -379
- package/src/components/Content/Card/Styles/One.tsx +0 -386
- package/src/components/Content/Card/Styles/RotateInOut.tsx +0 -413
- package/src/components/Content/Card/Styles/Six.tsx +0 -392
- package/src/components/Content/Card/Styles/Three.tsx +0 -314
- package/src/components/Content/Card/Styles/TopTen.tsx +0 -412
- package/src/components/Content/Card/Styles/Two.tsx +0 -416
- package/src/components/Content/Card/components/AdsPoster.tsx +0 -202
- package/src/components/Content/Card/components/CardPoster.tsx +0 -377
- package/src/components/Content/Card/components/NavigateToMore.tsx +0 -97
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +0 -129
- package/src/components/Content/Card/components/ShowAllButton.tsx +0 -92
- package/src/components/Content/Card/components/ThumbnailCard.tsx +0 -234
- package/src/components/Content/Card/components/index.ts +0 -1
- package/src/components/Content/Card/index.ts +0 -30
- package/src/components/Content/Content.tsx +0 -315
- package/src/components/Content/Sections.tsx +0 -238
- package/src/components/Content/types.ts +0 -176
- package/src/components/ContentView/MoreContentList.tsx +0 -327
- package/src/components/ContentView/One/ContentViewOne.tsx +0 -243
- package/src/components/ContentView/One/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/One/components/CastCard.tsx +0 -265
- package/src/components/ContentView/One/components/EpisodeCard.tsx +0 -535
- package/src/components/ContentView/One/components/GenreTags.tsx +0 -132
- package/src/components/ContentView/One/components/HeroBanner.tsx +0 -357
- package/src/components/ContentView/One/components/MiniInfo.tsx +0 -356
- package/src/components/ContentView/One/components/PlayButton.tsx +0 -56
- package/src/components/ContentView/One/components/Title.tsx +0 -149
- package/src/components/ContentView/One/components/TrailerButton.tsx +0 -76
- package/src/components/ContentView/Two/ContentViewTwo.tsx +0 -343
- package/src/components/ContentView/Two/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/Two/components/Details.tsx +0 -193
- package/src/components/ContentView/Two/components/EpisodeCard.tsx +0 -602
- package/src/components/ContentView/Two/components/GenreTags.tsx +0 -123
- package/src/components/ContentView/Two/components/HeroBanner.tsx +0 -402
- package/src/components/ContentView/Two/components/LikeShareActions.tsx +0 -125
- package/src/components/ContentView/Two/components/MoreLikeThisContentList .tsx +0 -305
- package/src/components/ContentView/Two/components/PlayOrTrailer.tsx +0 -133
- package/src/components/ContentView/Two/components/SectionTabs.tsx +0 -177
- package/src/components/ContentView/Two/components/Title.tsx +0 -226
- package/src/components/ContentView/Two/components/index.ts +0 -15
- package/src/components/ContentView/index.ts +0 -13
- package/src/components/Fallbacks/NoContentFallback.tsx +0 -176
- package/src/components/Fallbacks/NotFoundFallback.tsx +0 -94
- package/src/components/Fallbacks/index.ts +0 -2
- package/src/components/Headers/AppHeader.tsx +0 -150
- package/src/components/Headers/Four.tsx +0 -83
- package/src/components/Headers/One.tsx +0 -115
- package/src/components/Headers/Three.tsx +0 -135
- package/src/components/Headers/Two.tsx +0 -100
- package/src/components/Headers/index.ts +0 -18
- package/src/components/Input/Input.ts +0 -20
- package/src/components/Input/InputOne.tsx +0 -259
- package/src/components/Input/InputThree.tsx +0 -212
- package/src/components/Input/InputTwo.tsx +0 -212
- package/src/components/Input/PhoneNumberInput.tsx +0 -431
- package/src/components/Input/PhoneNumberInputTwo.tsx +0 -418
- package/src/components/Keyboard/HideKeyboard.tsx +0 -88
- package/src/components/Loader/Loader.tsx +0 -44
- package/src/components/Logo/Logo.tsx +0 -145
- package/src/components/NewRelease/NewReleaseSheet.tsx +0 -250
- package/src/components/NewRelease/index.ts +0 -1
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +0 -221
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +0 -314
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +0 -196
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +0 -95
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +0 -163
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +0 -210
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +0 -146
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +0 -154
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +0 -264
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +0 -494
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +0 -184
- package/src/components/Reels/ReelsSeries/components/Episodes.tsx +0 -154
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +0 -41
- package/src/components/Reels/ReelsSeries/components/Like.tsx +0 -40
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +0 -79
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +0 -332
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +0 -187
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +0 -80
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +0 -2
- package/src/components/Reels/ReelsSeries/types.ts +0 -54
- package/src/components/Reels/ReelsSeries/useReelsWatchProgress.ts +0 -85
- package/src/components/Reels/ReelsSeries/utils/quality.ts +0 -48
- package/src/components/Reels/index.ts +0 -9
- package/src/components/Reels/utils/Controls/gestureUtils.ts +0 -42
- package/src/components/Reels/utils/Controls/index.ts +0 -4
- package/src/components/Reels/utils/Controls/overlayUtils.ts +0 -35
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +0 -25
- package/src/components/Reels/utils/Controls/videoRef.ts +0 -4
- package/src/components/Reels/utils/index.ts +0 -1
- package/src/components/Reels/utils/timeoutUtils.ts +0 -29
- package/src/components/Search/One.tsx +0 -256
- package/src/components/Search/components/RecentSearchesSection.tsx +0 -181
- package/src/components/Search/components/SearchCard.tsx +0 -275
- package/src/components/Search/index.ts +0 -16
- package/src/components/Settings/AppSettings.tsx +0 -428
- package/src/components/Settings/index.ts +0 -1
- package/src/components/Subscription/SubOne.tsx +0 -874
- package/src/components/Subscription/index.ts +0 -12
- package/src/components/TabBar/One.tsx +0 -148
- package/src/components/TabBar/Three.tsx +0 -169
- package/src/components/TabBar/Two.tsx +0 -189
- package/src/components/TabBar/index.ts +0 -20
- package/src/components/Text/Text.tsx +0 -85
- package/src/components/Text/index.ts +0 -5
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +0 -468
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +0 -278
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +0 -494
- package/src/components/User/WatchHistory/WatchHistory.tsx +0 -227
- package/src/components/User/WatchLater/WatchLater.tsx +0 -397
- package/src/components/User/components/UserAvatar.tsx +0 -120
- package/src/components/User/components/UserSection.tsx +0 -228
- package/src/components/User/index.ts +0 -18
- package/src/components/View/View.tsx +0 -37
- package/src/components/View/index.ts +0 -5
- package/src/components/common/AppStatusBar.tsx +0 -57
- package/src/components/index.ts +0 -29
- package/src/components/layout/SafeAreaWrapper.tsx +0 -45
- package/src/components/layout/index.ts +0 -1
- package/src/constants/dummySections.ts +0 -98
- package/src/hooks/Images/index.ts +0 -2
- package/src/hooks/Images/useImageLoader.ts +0 -206
- package/src/hooks/Images/useImageValidation.ts +0 -36
- package/src/hooks/index.ts +0 -17
- package/src/hooks/useAdTracking.ts +0 -349
- package/src/hooks/useCards.ts +0 -228
- package/src/hooks/useDebounce.ts +0 -35
- package/src/hooks/useKeyboard.ts +0 -43
- package/src/hooks/useNavigationMode.ts +0 -46
- package/src/hooks/usePaginatedSection.ts +0 -101
- package/src/hooks/usePrevious.ts +0 -28
- package/src/hooks/useSafeCallback.ts +0 -43
- package/src/hooks/useSkeletonItems.ts +0 -30
- package/src/hooks/useSplashCache.ts +0 -186
- package/src/hooks/useThemeColors.ts +0 -51
- package/src/index.tsx +0 -8
- package/src/store/RecentSearchesStore.ts +0 -78
- package/src/store/splashStore.ts +0 -91
- package/src/store/themeStore.ts +0 -43
- package/src/theme/ThemeProvider.tsx +0 -112
- package/src/theme/hook/index.ts +0 -1
- package/src/theme/hook/useInternalTheme.ts +0 -98
- package/src/theme/index.ts +0 -7
- package/src/theme/themes.ts +0 -336
- package/src/theme/utils/validateColor.ts +0 -127
- package/src/types/content/content-view.types.ts +0 -206
- package/src/types/hook/index.ts +0 -5
- package/src/types/hook/usePaginatedSetion.ts +0 -19
- package/src/types/index.ts +0 -7
- package/src/types/sections/index.ts +0 -84
- package/src/utils/Display.ts +0 -14
- package/src/utils/Formater.ts +0 -14
- package/src/utils/PlatformSelector.ts +0 -29
- package/src/utils/SizeMatters.ts +0 -7
- package/src/utils/Spacing.ts +0 -27
- package/src/utils/colorUtils.ts +0 -70
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Wed 02 Jul 2025 at 04:50 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo, useCallback } from 'react';
|
|
7
|
-
import { View, StyleSheet, Animated } from 'react-native';
|
|
8
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
9
|
-
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
10
|
-
import { scale, verticalScale } from 'react-native-size-matters';
|
|
11
|
-
import FastImage from 'react-native-fast-image';
|
|
12
|
-
import tinycolor from 'tinycolor2';
|
|
13
|
-
|
|
14
|
-
import { PlayButton } from './PlayButton';
|
|
15
|
-
import { TrailerButton } from './TrailerButton';
|
|
16
|
-
import BackBtn from '../../../Button/BackBtn';
|
|
17
|
-
import MenuBtn from '../../../Button/MenuBtn';
|
|
18
|
-
import type { HeroBannerProps } from '../../../../types/content/content-view.types';
|
|
19
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
20
|
-
import RentOrBuyIcon from '../../../Content/Card/components/RentOrBuyIcon';
|
|
21
|
-
import { useInternalTheme } from '../../../../theme/hook';
|
|
22
|
-
import { Text } from '../../../Text';
|
|
23
|
-
import { useImageLoader } from '../../../../hooks/Images';
|
|
24
|
-
|
|
25
|
-
const SKELETON_CIRCLE_SIZE = scale(50);
|
|
26
|
-
const BANNER_HEIGHT = verticalScale(200);
|
|
27
|
-
const BACK_BTN_SIZE = scale(35);
|
|
28
|
-
|
|
29
|
-
export const HeroBanner = React.memo(
|
|
30
|
-
({
|
|
31
|
-
backgroundImage,
|
|
32
|
-
title,
|
|
33
|
-
theme: themeOverride,
|
|
34
|
-
isLoading = false,
|
|
35
|
-
onPressPlay,
|
|
36
|
-
onBackPress,
|
|
37
|
-
style,
|
|
38
|
-
renderButtons,
|
|
39
|
-
renderSkeletons,
|
|
40
|
-
menuActions,
|
|
41
|
-
content_offering_type,
|
|
42
|
-
}: HeroBannerProps) => {
|
|
43
|
-
const { theme } = useInternalTheme(themeOverride);
|
|
44
|
-
|
|
45
|
-
// Use reusable image loading hook with caching support
|
|
46
|
-
const {
|
|
47
|
-
imageError,
|
|
48
|
-
showSkeleton: imageShowSkeleton,
|
|
49
|
-
imageSource,
|
|
50
|
-
handleLoad: handleImageLoad,
|
|
51
|
-
handleError: handleImageError,
|
|
52
|
-
} = useImageLoader({
|
|
53
|
-
imageUri: backgroundImage || '',
|
|
54
|
-
isLoading,
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const handlePressPlay = useCallback(
|
|
58
|
-
({ is_trailer }: { is_trailer: boolean }) => {
|
|
59
|
-
onPressPlay?.({ is_trailer });
|
|
60
|
-
},
|
|
61
|
-
[onPressPlay]
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
const showSkeleton = useMemo(
|
|
65
|
-
() => isLoading || (imageShowSkeleton && !!backgroundImage),
|
|
66
|
-
[isLoading, imageShowSkeleton, backgroundImage]
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
// Memoize gradient colors - use theme gradient with optimized transition
|
|
70
|
-
const gradientColors = useMemo(() => {
|
|
71
|
-
const bgColorBase = theme.colors.background;
|
|
72
|
-
return [
|
|
73
|
-
tinycolor(bgColorBase).toRgbString(), // Solid at bottom (100% opacity)
|
|
74
|
-
tinycolor(bgColorBase).setAlpha(0.66).toRgbString(), // 66% opacity
|
|
75
|
-
tinycolor(bgColorBase).setAlpha(0.2).toRgbString(), // 20% opacity
|
|
76
|
-
tinycolor(bgColorBase).setAlpha(0.1).toRgbString(), // 10% opacity
|
|
77
|
-
'rgba(0, 0, 0, 0)',
|
|
78
|
-
];
|
|
79
|
-
}, [theme.colors.background]);
|
|
80
|
-
|
|
81
|
-
const styles = useMemo(
|
|
82
|
-
() =>
|
|
83
|
-
StyleSheet.create({
|
|
84
|
-
container: {
|
|
85
|
-
height: BANNER_HEIGHT,
|
|
86
|
-
width: '100%',
|
|
87
|
-
overflow: 'hidden',
|
|
88
|
-
position: 'relative',
|
|
89
|
-
backgroundColor: theme.colors.backgroundDisabled,
|
|
90
|
-
},
|
|
91
|
-
rentOrBuyIcon: {
|
|
92
|
-
position: 'absolute',
|
|
93
|
-
bottom: verticalScale(20),
|
|
94
|
-
zIndex: 4,
|
|
95
|
-
left: scale(10),
|
|
96
|
-
},
|
|
97
|
-
centeredContent: {
|
|
98
|
-
...StyleSheet.absoluteFillObject,
|
|
99
|
-
justifyContent: 'center',
|
|
100
|
-
alignItems: 'center',
|
|
101
|
-
zIndex: 4,
|
|
102
|
-
pointerEvents: 'box-none',
|
|
103
|
-
},
|
|
104
|
-
skeletonContainer: {
|
|
105
|
-
...StyleSheet.absoluteFillObject,
|
|
106
|
-
backgroundColor: theme.colors.backgroundDisabled,
|
|
107
|
-
justifyContent: 'center',
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
zIndex: 2,
|
|
110
|
-
},
|
|
111
|
-
errorContainer: {
|
|
112
|
-
...StyleSheet.absoluteFillObject,
|
|
113
|
-
justifyContent: 'center',
|
|
114
|
-
alignItems: 'center',
|
|
115
|
-
backgroundColor: theme.colors.backgroundDisabled,
|
|
116
|
-
zIndex: 1,
|
|
117
|
-
},
|
|
118
|
-
errorText: {
|
|
119
|
-
color: theme.colors.textSecondary,
|
|
120
|
-
fontSize: RFValue(15),
|
|
121
|
-
textAlign: 'center',
|
|
122
|
-
},
|
|
123
|
-
imageContainer: {
|
|
124
|
-
...StyleSheet.absoluteFillObject,
|
|
125
|
-
zIndex: 0,
|
|
126
|
-
},
|
|
127
|
-
trailerButtonWrapper: {
|
|
128
|
-
...StyleSheet.absoluteFillObject,
|
|
129
|
-
justifyContent: 'flex-end',
|
|
130
|
-
alignItems: 'center',
|
|
131
|
-
bottom: verticalScale(10),
|
|
132
|
-
zIndex: 4,
|
|
133
|
-
pointerEvents: 'box-none',
|
|
134
|
-
},
|
|
135
|
-
backBtnSkeleton: {
|
|
136
|
-
position: 'absolute',
|
|
137
|
-
top: scale(6),
|
|
138
|
-
left: scale(13),
|
|
139
|
-
zIndex: 4,
|
|
140
|
-
},
|
|
141
|
-
menuBtnSkeleton: {
|
|
142
|
-
position: 'absolute',
|
|
143
|
-
top: scale(6),
|
|
144
|
-
right: scale(13),
|
|
145
|
-
zIndex: 4,
|
|
146
|
-
},
|
|
147
|
-
defaultBackBtn: {
|
|
148
|
-
position: 'absolute',
|
|
149
|
-
top: scale(6),
|
|
150
|
-
left: scale(13),
|
|
151
|
-
zIndex: 4,
|
|
152
|
-
backgroundColor: theme.colors.background,
|
|
153
|
-
},
|
|
154
|
-
defaultMenuBtn: {
|
|
155
|
-
position: 'absolute',
|
|
156
|
-
top: scale(6),
|
|
157
|
-
right: scale(13),
|
|
158
|
-
zIndex: 4,
|
|
159
|
-
backgroundColor: theme.colors.background,
|
|
160
|
-
},
|
|
161
|
-
badge: {
|
|
162
|
-
position: 'absolute',
|
|
163
|
-
bottom: verticalScale(20),
|
|
164
|
-
left: scale(10),
|
|
165
|
-
paddingHorizontal: scale(8),
|
|
166
|
-
paddingVertical: scale(4),
|
|
167
|
-
borderRadius: scale(8),
|
|
168
|
-
},
|
|
169
|
-
}),
|
|
170
|
-
[theme]
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
<View style={[styles.container, style]} accessibilityLabel={title}>
|
|
175
|
-
{/* Back Button */}
|
|
176
|
-
{showSkeleton
|
|
177
|
-
? (renderSkeletons?.back?.() ?? (
|
|
178
|
-
<View style={styles.backBtnSkeleton}>
|
|
179
|
-
<SkeletonPlaceholder
|
|
180
|
-
backgroundColor={theme.colors.skeletonBaseColor}
|
|
181
|
-
highlightColor={theme.colors.skeletonHighlightColor}
|
|
182
|
-
speed={800}
|
|
183
|
-
>
|
|
184
|
-
<SkeletonPlaceholder.Item
|
|
185
|
-
width={BACK_BTN_SIZE}
|
|
186
|
-
height={BACK_BTN_SIZE}
|
|
187
|
-
borderRadius={BACK_BTN_SIZE / 2}
|
|
188
|
-
/>
|
|
189
|
-
</SkeletonPlaceholder>
|
|
190
|
-
</View>
|
|
191
|
-
))
|
|
192
|
-
: (renderButtons?.back?.() ??
|
|
193
|
-
(onBackPress && (
|
|
194
|
-
<BackBtn
|
|
195
|
-
theme={themeOverride}
|
|
196
|
-
onPress={onBackPress}
|
|
197
|
-
style={styles.defaultBackBtn}
|
|
198
|
-
size={scale(20)}
|
|
199
|
-
/>
|
|
200
|
-
)))}
|
|
201
|
-
|
|
202
|
-
{/* Menu Button */}
|
|
203
|
-
{showSkeleton && menuActions
|
|
204
|
-
? (renderSkeletons?.menu?.() ?? (
|
|
205
|
-
<View style={styles.menuBtnSkeleton}>
|
|
206
|
-
<SkeletonPlaceholder
|
|
207
|
-
backgroundColor={theme.colors.skeletonBaseColor}
|
|
208
|
-
highlightColor={theme.colors.skeletonHighlightColor}
|
|
209
|
-
speed={800}
|
|
210
|
-
>
|
|
211
|
-
<SkeletonPlaceholder.Item
|
|
212
|
-
width={BACK_BTN_SIZE}
|
|
213
|
-
height={BACK_BTN_SIZE}
|
|
214
|
-
borderRadius={BACK_BTN_SIZE / 2}
|
|
215
|
-
/>
|
|
216
|
-
</SkeletonPlaceholder>
|
|
217
|
-
</View>
|
|
218
|
-
))
|
|
219
|
-
: menuActions &&
|
|
220
|
-
(renderButtons?.menu?.() ?? (
|
|
221
|
-
<MenuBtn
|
|
222
|
-
theme={themeOverride}
|
|
223
|
-
style={styles.defaultMenuBtn}
|
|
224
|
-
actions={menuActions}
|
|
225
|
-
/>
|
|
226
|
-
))}
|
|
227
|
-
|
|
228
|
-
{/* Gradient Overlay */}
|
|
229
|
-
{!showSkeleton && (
|
|
230
|
-
<LinearGradient
|
|
231
|
-
colors={gradientColors}
|
|
232
|
-
style={[StyleSheet.absoluteFill, { zIndex: 1 }]}
|
|
233
|
-
start={{ x: 0, y: 1 }}
|
|
234
|
-
end={{ x: 0, y: 0 }}
|
|
235
|
-
/>
|
|
236
|
-
)}
|
|
237
|
-
{/* Background Image */}
|
|
238
|
-
{!isLoading && (
|
|
239
|
-
<>
|
|
240
|
-
<View style={styles.imageContainer}>
|
|
241
|
-
<FastImage
|
|
242
|
-
style={StyleSheet.absoluteFillObject}
|
|
243
|
-
source={imageSource}
|
|
244
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
245
|
-
onLoad={handleImageLoad}
|
|
246
|
-
onError={handleImageError}
|
|
247
|
-
accessibilityLabel={`Background image for ${title}`}
|
|
248
|
-
/>
|
|
249
|
-
</View>
|
|
250
|
-
{/* Badge above gradient */}
|
|
251
|
-
{content_offering_type && content_offering_type === 'FREE' && (
|
|
252
|
-
<View
|
|
253
|
-
style={[
|
|
254
|
-
styles.badge,
|
|
255
|
-
{ backgroundColor: theme.colors.primary, zIndex: 2 },
|
|
256
|
-
]}
|
|
257
|
-
>
|
|
258
|
-
<Text
|
|
259
|
-
type="caption"
|
|
260
|
-
style={{ color: theme.colors.onPrimary, fontWeight: '600' }}
|
|
261
|
-
theme={themeOverride}
|
|
262
|
-
>
|
|
263
|
-
{content_offering_type}
|
|
264
|
-
</Text>
|
|
265
|
-
</View>
|
|
266
|
-
)}
|
|
267
|
-
|
|
268
|
-
{content_offering_type && (
|
|
269
|
-
<RentOrBuyIcon
|
|
270
|
-
size={30}
|
|
271
|
-
theme={theme}
|
|
272
|
-
style={[styles.rentOrBuyIcon, { zIndex: 2 }]}
|
|
273
|
-
content_offering_type={content_offering_type}
|
|
274
|
-
/>
|
|
275
|
-
)}
|
|
276
|
-
</>
|
|
277
|
-
)}
|
|
278
|
-
|
|
279
|
-
{/* Skeleton UI */}
|
|
280
|
-
{showSkeleton && !imageError && onPressPlay && (
|
|
281
|
-
<>
|
|
282
|
-
<View style={styles.skeletonContainer}>
|
|
283
|
-
{renderSkeletons?.play?.() ?? (
|
|
284
|
-
<SkeletonPlaceholder
|
|
285
|
-
backgroundColor={theme.colors.skeletonBaseColor}
|
|
286
|
-
highlightColor={theme.colors.skeletonHighlightColor}
|
|
287
|
-
speed={800}
|
|
288
|
-
>
|
|
289
|
-
<SkeletonPlaceholder.Item
|
|
290
|
-
width="100%"
|
|
291
|
-
height="100%"
|
|
292
|
-
justifyContent="center"
|
|
293
|
-
alignItems="center"
|
|
294
|
-
>
|
|
295
|
-
<SkeletonPlaceholder.Item
|
|
296
|
-
width={SKELETON_CIRCLE_SIZE}
|
|
297
|
-
height={SKELETON_CIRCLE_SIZE}
|
|
298
|
-
borderRadius={SKELETON_CIRCLE_SIZE / 2}
|
|
299
|
-
/>
|
|
300
|
-
</SkeletonPlaceholder.Item>
|
|
301
|
-
</SkeletonPlaceholder>
|
|
302
|
-
)}
|
|
303
|
-
</View>
|
|
304
|
-
|
|
305
|
-
<View style={styles.trailerButtonWrapper}>
|
|
306
|
-
{renderSkeletons?.trailer?.() ?? (
|
|
307
|
-
<SkeletonPlaceholder
|
|
308
|
-
backgroundColor={theme.colors.skeletonBaseColor}
|
|
309
|
-
highlightColor={theme.colors.skeletonHighlightColor}
|
|
310
|
-
speed={800}
|
|
311
|
-
>
|
|
312
|
-
<SkeletonPlaceholder.Item
|
|
313
|
-
width={scale(110)}
|
|
314
|
-
height={verticalScale(25)}
|
|
315
|
-
borderRadius={scale(14)}
|
|
316
|
-
/>
|
|
317
|
-
</SkeletonPlaceholder>
|
|
318
|
-
)}
|
|
319
|
-
</View>
|
|
320
|
-
</>
|
|
321
|
-
)}
|
|
322
|
-
|
|
323
|
-
{/* Play & Trailer Buttons */}
|
|
324
|
-
{!showSkeleton && !imageError && onPressPlay && (
|
|
325
|
-
<>
|
|
326
|
-
<Animated.View style={styles.centeredContent}>
|
|
327
|
-
{renderButtons?.play?.() ?? (
|
|
328
|
-
<PlayButton
|
|
329
|
-
color={theme.colors.buttonText}
|
|
330
|
-
backgroundColor={theme.colors.button}
|
|
331
|
-
onPress={() => handlePressPlay({ is_trailer: false })}
|
|
332
|
-
/>
|
|
333
|
-
)}
|
|
334
|
-
</Animated.View>
|
|
335
|
-
|
|
336
|
-
<Animated.View style={styles.trailerButtonWrapper}>
|
|
337
|
-
{renderButtons?.trailer?.() ?? (
|
|
338
|
-
<TrailerButton
|
|
339
|
-
color={theme.colors.buttonText}
|
|
340
|
-
backgroundColor={theme.colors.button}
|
|
341
|
-
onPress={() => handlePressPlay({ is_trailer: true })}
|
|
342
|
-
/>
|
|
343
|
-
)}
|
|
344
|
-
</Animated.View>
|
|
345
|
-
</>
|
|
346
|
-
)}
|
|
347
|
-
|
|
348
|
-
{/* Error UI */}
|
|
349
|
-
{imageError && !isLoading && (
|
|
350
|
-
<Animated.View style={styles.errorContainer}>
|
|
351
|
-
<Text style={styles.errorText}>Failed to load image</Text>
|
|
352
|
-
</Animated.View>
|
|
353
|
-
)}
|
|
354
|
-
</View>
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
);
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Tue 11 Nov 2025 at 09:23 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo, useCallback } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
View,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
type StyleProp,
|
|
11
|
-
type ViewStyle,
|
|
12
|
-
type TextStyle,
|
|
13
|
-
} from 'react-native';
|
|
14
|
-
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
15
|
-
import { scale } from 'react-native-size-matters';
|
|
16
|
-
import { Text } from '../../../Text';
|
|
17
|
-
import type { ThemeOverride } from '../../../../theme/themes';
|
|
18
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
19
|
-
import moment from 'moment';
|
|
20
|
-
import { useInternalTheme } from '../../../../theme/hook';
|
|
21
|
-
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
22
|
-
|
|
23
|
-
type Props = {
|
|
24
|
-
content?: IContentData;
|
|
25
|
-
theme?: ThemeOverride;
|
|
26
|
-
isLoading?: boolean;
|
|
27
|
-
visible?: boolean;
|
|
28
|
-
userData?: {
|
|
29
|
-
is_buy_or_rent?: 'BUY' | 'RENT';
|
|
30
|
-
rent_expiry_date?: any;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
labels?: {
|
|
34
|
-
purchased?: string;
|
|
35
|
-
rented?: string;
|
|
36
|
-
buyOrRent?: string;
|
|
37
|
-
rentedExpiryPrefix?: string;
|
|
38
|
-
purchasedMsg?: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
style?: {
|
|
42
|
-
container?: StyleProp<ViewStyle>;
|
|
43
|
-
row?: StyleProp<ViewStyle>;
|
|
44
|
-
title?: StyleProp<TextStyle>;
|
|
45
|
-
subTitle?: StyleProp<TextStyle>;
|
|
46
|
-
badge?: StyleProp<ViewStyle>;
|
|
47
|
-
price?: StyleProp<TextStyle>;
|
|
48
|
-
rating?: StyleProp<TextStyle>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export function formatCurrency(
|
|
53
|
-
amount: number,
|
|
54
|
-
currency: string = 'INR'
|
|
55
|
-
): string {
|
|
56
|
-
return new Intl.NumberFormat('en-IN', {
|
|
57
|
-
style: 'currency',
|
|
58
|
-
currency,
|
|
59
|
-
minimumFractionDigits: 0,
|
|
60
|
-
maximumFractionDigits: 2,
|
|
61
|
-
}).format(amount);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const MiniInfo = React.memo(
|
|
65
|
-
({
|
|
66
|
-
content,
|
|
67
|
-
theme,
|
|
68
|
-
userData,
|
|
69
|
-
isLoading = false,
|
|
70
|
-
style,
|
|
71
|
-
labels,
|
|
72
|
-
visible = true,
|
|
73
|
-
}: Props): React.ReactElement | null => {
|
|
74
|
-
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
75
|
-
|
|
76
|
-
// All hooks must be called before any early returns
|
|
77
|
-
const textLabels = useMemo(
|
|
78
|
-
() => ({
|
|
79
|
-
purchased: labels?.purchased || 'Purchased',
|
|
80
|
-
rented: labels?.rented || 'Rented',
|
|
81
|
-
buyOrRent: labels?.buyOrRent || 'Buy or Rent',
|
|
82
|
-
rentedExpiryPrefix: labels?.rentedExpiryPrefix || '',
|
|
83
|
-
purchasedMsg: labels?.purchasedMsg || 'You purchased this content',
|
|
84
|
-
}),
|
|
85
|
-
[labels]
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const containerStyle = useMemo(
|
|
89
|
-
() => [
|
|
90
|
-
styles.container,
|
|
91
|
-
style?.container,
|
|
92
|
-
{
|
|
93
|
-
backgroundColor: appliedTheme.colors.background,
|
|
94
|
-
borderColor: appliedTheme.colors.border,
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
[
|
|
98
|
-
style?.container,
|
|
99
|
-
appliedTheme.colors.background,
|
|
100
|
-
appliedTheme.colors.border,
|
|
101
|
-
]
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
const badgeStyle = useMemo(
|
|
105
|
-
() => [
|
|
106
|
-
styles.badge,
|
|
107
|
-
{
|
|
108
|
-
backgroundColor: appliedTheme.colors.primary,
|
|
109
|
-
shadowColor: appliedTheme.colors.textPrimary,
|
|
110
|
-
},
|
|
111
|
-
style?.badge,
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
appliedTheme.colors.primary,
|
|
115
|
-
appliedTheme.colors.textPrimary,
|
|
116
|
-
style?.badge,
|
|
117
|
-
]
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
const badgeTextStyle = useMemo(
|
|
121
|
-
() => ({
|
|
122
|
-
color: appliedTheme.colors.onPrimary,
|
|
123
|
-
fontWeight: '600' as const,
|
|
124
|
-
}),
|
|
125
|
-
[appliedTheme.colors.onPrimary]
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
// Memoize price info style
|
|
129
|
-
const priceTextStyle = useMemo(
|
|
130
|
-
() => [
|
|
131
|
-
styles.subTitle,
|
|
132
|
-
{ color: appliedTheme.colors.textPrimary },
|
|
133
|
-
style?.price,
|
|
134
|
-
],
|
|
135
|
-
[appliedTheme.colors.textPrimary, style?.price]
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
// Memoize expiry text style
|
|
139
|
-
const expiryTextStyle = useMemo(
|
|
140
|
-
() => ({
|
|
141
|
-
color: appliedTheme.colors.textSecondary,
|
|
142
|
-
marginTop: scale(4),
|
|
143
|
-
}),
|
|
144
|
-
[appliedTheme.colors.textSecondary]
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
const formatRentExpiryLabel = useCallback((rawDate: any): string => {
|
|
148
|
-
if (!rawDate) return '';
|
|
149
|
-
|
|
150
|
-
const m = moment(rawDate);
|
|
151
|
-
if (!m.isValid()) {
|
|
152
|
-
return String(rawDate);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const now = moment();
|
|
156
|
-
|
|
157
|
-
// Already expired states – keep copy short for chips
|
|
158
|
-
if (m.isBefore(now)) {
|
|
159
|
-
const daysAgo = now.diff(m, 'days');
|
|
160
|
-
|
|
161
|
-
if (m.isSame(now, 'day')) {
|
|
162
|
-
return 'today';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (daysAgo === 1) {
|
|
166
|
-
return 'yesterday';
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (daysAgo < 7) {
|
|
170
|
-
return `${daysAgo}d ago`;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
if (m.year() === now.year()) {
|
|
174
|
-
return m.format('D MMM');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return m.format('D MMM YYYY');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Future / active rentals
|
|
181
|
-
const daysDiff = m.diff(now, 'days');
|
|
182
|
-
|
|
183
|
-
if (daysDiff === 0) {
|
|
184
|
-
return 'today';
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (daysDiff === 1) {
|
|
188
|
-
return 'tomorrow';
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (daysDiff < 7) {
|
|
192
|
-
return `in ${daysDiff}d`;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (m.year() === now.year()) {
|
|
196
|
-
return m.format('D MMM');
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return m.format('D MMM YYYY');
|
|
200
|
-
}, []);
|
|
201
|
-
|
|
202
|
-
// Extract content values safely
|
|
203
|
-
const content_offering_type = content?.content_offering_type;
|
|
204
|
-
const price = content?.price;
|
|
205
|
-
const is_buy_or_rent = content?.is_buy_or_rent;
|
|
206
|
-
const rent_duration = content?.rent_duration;
|
|
207
|
-
|
|
208
|
-
const renderBadge = useCallback(() => {
|
|
209
|
-
let text = textLabels.buyOrRent;
|
|
210
|
-
|
|
211
|
-
if (userData?.is_buy_or_rent === 'BUY') {
|
|
212
|
-
text = textLabels.purchased;
|
|
213
|
-
} else if (userData?.is_buy_or_rent === 'RENT') {
|
|
214
|
-
text = textLabels.rented;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return (
|
|
218
|
-
<View style={badgeStyle}>
|
|
219
|
-
<Text type="caption" style={badgeTextStyle}>
|
|
220
|
-
{text}
|
|
221
|
-
</Text>
|
|
222
|
-
</View>
|
|
223
|
-
);
|
|
224
|
-
}, [textLabels, userData?.is_buy_or_rent, badgeStyle, badgeTextStyle]);
|
|
225
|
-
|
|
226
|
-
const renderPriceInfo = useCallback(() => {
|
|
227
|
-
if (!price) return null;
|
|
228
|
-
|
|
229
|
-
const text =
|
|
230
|
-
is_buy_or_rent === 'BUY'
|
|
231
|
-
? `Price: ${formatCurrency(price)}`
|
|
232
|
-
: `Rent: ${formatCurrency(price)} for ${rent_duration ?? 1} day(s)`;
|
|
233
|
-
|
|
234
|
-
return (
|
|
235
|
-
<Text type="subtitle" style={priceTextStyle}>
|
|
236
|
-
{text}
|
|
237
|
-
</Text>
|
|
238
|
-
);
|
|
239
|
-
}, [price, is_buy_or_rent, rent_duration, priceTextStyle]);
|
|
240
|
-
|
|
241
|
-
const renderUserExpiry = useCallback(() => {
|
|
242
|
-
if (!userData?.is_buy_or_rent) return null;
|
|
243
|
-
|
|
244
|
-
if (userData.is_buy_or_rent === 'BUY') {
|
|
245
|
-
return (
|
|
246
|
-
<Text type="caption" style={expiryTextStyle}>
|
|
247
|
-
{textLabels.purchasedMsg}
|
|
248
|
-
</Text>
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
if (userData.is_buy_or_rent === 'RENT') {
|
|
253
|
-
const formattedLabel = formatRentExpiryLabel(
|
|
254
|
-
userData?.rent_expiry_date
|
|
255
|
-
);
|
|
256
|
-
|
|
257
|
-
if (!formattedLabel) return null;
|
|
258
|
-
|
|
259
|
-
return (
|
|
260
|
-
<Text type="caption" style={expiryTextStyle}>
|
|
261
|
-
{textLabels.rentedExpiryPrefix
|
|
262
|
-
? `${textLabels.rentedExpiryPrefix} ${formattedLabel}`
|
|
263
|
-
: formattedLabel}
|
|
264
|
-
</Text>
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return null;
|
|
269
|
-
}, [userData, textLabels, expiryTextStyle, formatRentExpiryLabel]);
|
|
270
|
-
|
|
271
|
-
// Early returns after all hooks
|
|
272
|
-
if (!visible) return null;
|
|
273
|
-
|
|
274
|
-
if (isLoading) {
|
|
275
|
-
return (
|
|
276
|
-
<View style={containerStyle}>
|
|
277
|
-
<SkeletonPlaceholder
|
|
278
|
-
backgroundColor={appliedTheme.colors.skeletonBaseColor}
|
|
279
|
-
highlightColor={appliedTheme.colors.skeletonHighlightColor}
|
|
280
|
-
>
|
|
281
|
-
<SkeletonPlaceholder.Item
|
|
282
|
-
flexDirection="row"
|
|
283
|
-
alignItems="center"
|
|
284
|
-
marginBottom={scale(6)}
|
|
285
|
-
>
|
|
286
|
-
<SkeletonPlaceholder.Item
|
|
287
|
-
width={scale(100)}
|
|
288
|
-
height={scale(20)}
|
|
289
|
-
borderRadius={scale(4)}
|
|
290
|
-
/>
|
|
291
|
-
<SkeletonPlaceholder.Item
|
|
292
|
-
width={scale(60)}
|
|
293
|
-
height={scale(20)}
|
|
294
|
-
borderRadius={scale(4)}
|
|
295
|
-
marginLeft={scale(8)}
|
|
296
|
-
/>
|
|
297
|
-
</SkeletonPlaceholder.Item>
|
|
298
|
-
|
|
299
|
-
<SkeletonPlaceholder.Item
|
|
300
|
-
width={scale(120)}
|
|
301
|
-
height={scale(16)}
|
|
302
|
-
borderRadius={scale(4)}
|
|
303
|
-
marginBottom={scale(4)}
|
|
304
|
-
/>
|
|
305
|
-
|
|
306
|
-
<SkeletonPlaceholder.Item
|
|
307
|
-
width={scale(80)}
|
|
308
|
-
height={scale(14)}
|
|
309
|
-
borderRadius={scale(4)}
|
|
310
|
-
/>
|
|
311
|
-
</SkeletonPlaceholder>
|
|
312
|
-
</View>
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
if (!content) return null;
|
|
317
|
-
|
|
318
|
-
if (content_offering_type !== 'BUY_OR_RENT') return null;
|
|
319
|
-
|
|
320
|
-
return (
|
|
321
|
-
<View style={containerStyle}>
|
|
322
|
-
<View style={styles.headerRow}>{renderBadge()}</View>
|
|
323
|
-
|
|
324
|
-
{!userData?.is_buy_or_rent && renderPriceInfo()}
|
|
325
|
-
|
|
326
|
-
{renderUserExpiry()}
|
|
327
|
-
</View>
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
);
|
|
331
|
-
|
|
332
|
-
const styles = StyleSheet.create({
|
|
333
|
-
container: {
|
|
334
|
-
borderWidth: 1,
|
|
335
|
-
borderRadius: scale(14),
|
|
336
|
-
padding: scale(10),
|
|
337
|
-
marginHorizontal: scale(6),
|
|
338
|
-
marginVertical: scale(6),
|
|
339
|
-
},
|
|
340
|
-
headerRow: {
|
|
341
|
-
flexDirection: 'row',
|
|
342
|
-
justifyContent: 'space-between',
|
|
343
|
-
alignItems: 'center',
|
|
344
|
-
marginBottom: scale(6),
|
|
345
|
-
},
|
|
346
|
-
badge: {
|
|
347
|
-
paddingHorizontal: scale(10),
|
|
348
|
-
paddingVertical: scale(5),
|
|
349
|
-
borderRadius: scale(10),
|
|
350
|
-
},
|
|
351
|
-
subTitle: {
|
|
352
|
-
fontSize: RFValue(12),
|
|
353
|
-
marginTop: scale(3),
|
|
354
|
-
fontWeight: '500',
|
|
355
|
-
},
|
|
356
|
-
});
|