@zezosoft/zezo-ott-react-native-ui-kit 1.0.3 → 1.0.5
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/README.md +1 -1
- package/lib/module/assets/animations/Failed.json +2103 -0
- package/lib/module/assets/animations/Pending.json +522 -0
- package/lib/module/assets/animations/Successful.json +2289 -0
- package/lib/module/assets/animations/heart.json +788 -0
- package/lib/module/components/Alert/AlertDialog.js +208 -0
- package/lib/module/components/Alert/AlertDialog.js.map +1 -0
- package/lib/module/components/Alert/index.js +1 -0
- package/lib/module/components/Alert/index.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +270 -0
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -0
- package/lib/module/components/Auth/QrLogin/QrLogin.js +267 -0
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -0
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +178 -0
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -0
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +63 -65
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +82 -41
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/Auth/index.js +5 -1
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +3 -3
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +91 -0
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -0
- package/lib/module/components/Button/index.js +2 -0
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +6 -3
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +4 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +4 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +1 -0
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +1 -0
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +7 -3
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +1 -0
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +4 -1
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +1 -0
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +1 -0
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +1 -0
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +12 -28
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +116 -0
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -0
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +1 -2
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +1 -0
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +1 -0
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +6 -10
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +17 -5
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +1 -1
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/One.js +1 -1
- package/lib/module/components/Headers/One.js.map +1 -1
- package/lib/module/components/Headers/Two.js +1 -1
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +5 -5
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js +110 -0
- package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +212 -0
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js +182 -0
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js +203 -0
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +121 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +290 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/types.js +2 -0
- package/lib/module/components/Reels/ReelsSeries/types.js.map +1 -0
- package/lib/module/components/Reels/index.js +11 -0
- package/lib/module/components/Reels/index.js.map +1 -0
- package/lib/module/components/Subscription/SubOne.js +2 -2
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +8 -0
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +255 -0
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js +1 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +1 -0
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +35 -8
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +8 -13
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/User/index.js +2 -1
- package/lib/module/components/User/index.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/useSplashCache.js +117 -0
- package/lib/module/hooks/useSplashCache.js.map +1 -0
- package/lib/module/store/RecentSearchesStore.js +0 -1
- package/lib/module/store/RecentSearchesStore.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +13 -10
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/themes.js +2 -0
- package/lib/module/theme/themes.js.map +1 -1
- package/lib/module/utils/Formater.js +17 -0
- package/lib/module/utils/Formater.js.map +1 -0
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts +18 -0
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +35 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +32 -0
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +15 -0
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +4 -3
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts +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 +3 -0
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +21 -0
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +11 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.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/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.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/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -2
- 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 +14 -0
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -0
- 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/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts +9 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts +18 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +15 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +18 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +24 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/index.d.ts +8 -0
- package/lib/typescript/src/components/Reels/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -0
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +27 -0
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -0
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +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 +4 -0
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/User/index.d.ts +2 -1
- package/lib/typescript/src/components/User/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useSplashCache.d.ts +22 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -0
- package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -1
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/themes.d.ts +1 -0
- package/lib/typescript/src/theme/themes.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +1 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/lib/typescript/src/utils/Formater.d.ts +2 -0
- package/lib/typescript/src/utils/Formater.d.ts.map +1 -0
- package/package.json +13 -5
- package/src/assets/animations/Failed.json +2103 -0
- package/src/assets/animations/Pending.json +522 -0
- package/src/assets/animations/Successful.json +2289 -0
- package/src/assets/animations/heart.json +788 -0
- package/src/components/Alert/AlertDialog.tsx +247 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +344 -0
- package/src/components/Auth/QrLogin/QrLogin.tsx +306 -0
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +213 -0
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +89 -80
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +90 -40
- package/src/components/Auth/index.ts +4 -0
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +3 -3
- package/src/components/Button/SecondaryBtn.tsx +116 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +4 -0
- package/src/components/Content/Card/Sliders/Styles/One.tsx +2 -0
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +2 -0
- package/src/components/Content/Card/Styles/Five.tsx +1 -0
- package/src/components/Content/Card/Styles/Four.tsx +1 -0
- package/src/components/Content/Card/Styles/One.tsx +7 -1
- package/src/components/Content/Card/Styles/RotateInOut.tsx +1 -0
- package/src/components/Content/Card/Styles/Six.tsx +2 -0
- package/src/components/Content/Card/Styles/Three.tsx +1 -0
- package/src/components/Content/Card/Styles/TopTen.tsx +1 -0
- package/src/components/Content/Card/Styles/Two.tsx +1 -0
- package/src/components/Content/Card/components/CardPoster.tsx +23 -51
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +109 -0
- package/src/components/Content/Card/components/ThumbnailCard.tsx +1 -2
- package/src/components/ContentView/ContentView.tsx +1 -0
- package/src/components/ContentView/MoreContentList.tsx +1 -0
- package/src/components/ContentView/components/EpisodeCard.tsx +4 -9
- package/src/components/ContentView/components/HeroBanner.tsx +16 -0
- package/src/components/Headers/AppHeader.tsx +1 -1
- package/src/components/Headers/One.tsx +1 -1
- package/src/components/Headers/Two.tsx +1 -1
- package/src/components/Logo/Logo.tsx +5 -7
- package/src/components/Reels/ReelsSeries/Model/Episodes.tsx +133 -0
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +242 -0
- package/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.tsx +209 -0
- package/src/components/Reels/ReelsSeries/ReelSeriesOverlay.tsx +185 -0
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +163 -0
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +333 -0
- package/src/components/Reels/ReelsSeries/types.ts +27 -0
- package/src/components/Reels/index.ts +8 -0
- package/src/components/Subscription/SubOne.tsx +4 -2
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +11 -0
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +263 -0
- package/src/components/User/WatchHistory/WatchHistory.tsx +1 -0
- package/src/components/User/WatchLater/WatchLater.tsx +1 -0
- package/src/components/User/components/UserAvatar.tsx +36 -3
- package/src/components/User/components/UserSection.tsx +10 -13
- package/src/components/User/index.ts +3 -1
- package/src/components/index.ts +1 -0
- package/src/hooks/useSplashCache.ts +166 -0
- package/src/store/RecentSearchesStore.ts +0 -1
- package/src/theme/ThemeProvider.tsx +12 -9
- package/src/theme/themes.ts +3 -0
- package/src/types/content/content-view.types.ts +1 -0
- package/src/utils/Formater.ts +14 -0
- package/lib/module/hooks/useInitSplashCacheSync.js +0 -116
- package/lib/module/hooks/useInitSplashCacheSync.js.map +0 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +0 -22
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +0 -1
- package/src/hooks/useInitSplashCacheSync.ts +0 -174
- /package/lib/module/assets/{img → svg}/h.svg +0 -0
- /package/src/assets/{img → svg}/h.svg +0 -0
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified
|
|
3
|
+
* @lastModified Fri 17 Oct 2025 at 09:51 PM
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useEffect, useMemo, useCallback } from 'react';
|
|
7
|
+
import { StatusBar, type ViewStyle } from 'react-native';
|
|
8
|
+
import Color from 'color';
|
|
9
|
+
|
|
7
10
|
import SplashImage from './components/SplashImage/SplashImage';
|
|
8
11
|
import SplashVideo from './components/SplashVideo/SplashVideo';
|
|
9
12
|
import SplashLottie from './components/SplashLottie/SplashLottie';
|
|
10
|
-
|
|
11
|
-
import type { AppTheme } from '../../../theme/themes';
|
|
13
|
+
|
|
12
14
|
import { useTheme } from '../../../theme';
|
|
13
|
-
import {
|
|
15
|
+
import type { AppTheme } from '../../../theme/themes';
|
|
16
|
+
|
|
14
17
|
import { BackgroundLayout } from '../../BackgroundLayout/BackgroundLayout';
|
|
15
|
-
import
|
|
16
|
-
|
|
18
|
+
import { useSplashCache } from '../../../hooks/useSplashCache';
|
|
19
|
+
|
|
20
|
+
type SplashType = 'image' | 'video' | 'lottie-animation';
|
|
17
21
|
|
|
18
22
|
type SplashScreenConfig = {
|
|
19
23
|
source: string;
|
|
20
|
-
type?:
|
|
24
|
+
type?: SplashType;
|
|
21
25
|
width: number;
|
|
22
26
|
height: number;
|
|
23
27
|
isStatic?: boolean;
|
|
@@ -28,6 +32,7 @@ type SplashScreenConfig = {
|
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
type SplashScreenProps = {
|
|
35
|
+
logoUrl: string;
|
|
31
36
|
splashScreenConfig: SplashScreenConfig;
|
|
32
37
|
innerContainerStyle?: ViewStyle;
|
|
33
38
|
onRedirect: () => void;
|
|
@@ -40,20 +45,11 @@ type SplashScreenProps = {
|
|
|
40
45
|
};
|
|
41
46
|
};
|
|
42
47
|
|
|
43
|
-
const
|
|
48
|
+
const DEFAULT_IMAGE_TIMEOUT = 5;
|
|
49
|
+
const FALLBACK_TIMEOUT = 0.5;
|
|
44
50
|
|
|
45
51
|
export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
46
|
-
splashScreenConfig
|
|
47
|
-
source: splashSource,
|
|
48
|
-
type: splashType = 'image',
|
|
49
|
-
width,
|
|
50
|
-
height,
|
|
51
|
-
isStatic = false,
|
|
52
|
-
screenTime,
|
|
53
|
-
fullscreen = false,
|
|
54
|
-
resizeMode = 'contain',
|
|
55
|
-
backgroundColor: splashBackgroundColor,
|
|
56
|
-
},
|
|
52
|
+
splashScreenConfig,
|
|
57
53
|
innerContainerStyle,
|
|
58
54
|
backgroundImage = {
|
|
59
55
|
gradientSplitBackground: 0.4,
|
|
@@ -62,32 +58,39 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
|
62
58
|
onRedirect,
|
|
63
59
|
theme: overrideTheme,
|
|
64
60
|
}) => {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
const {
|
|
62
|
+
source: splashSource,
|
|
63
|
+
type: splashType = 'image',
|
|
64
|
+
width,
|
|
65
|
+
height,
|
|
66
|
+
isStatic = false,
|
|
67
|
+
screenTime,
|
|
68
|
+
fullscreen = false,
|
|
69
|
+
resizeMode = 'contain',
|
|
70
|
+
backgroundColor: splashBgColor,
|
|
71
|
+
} = splashScreenConfig;
|
|
70
72
|
|
|
73
|
+
const { theme } = useTheme(overrideTheme);
|
|
74
|
+
const isRemote = splashSource.startsWith('http');
|
|
71
75
|
const isImageSplash = splashType === 'image';
|
|
72
|
-
|
|
76
|
+
|
|
77
|
+
const backgroundImageUrl =
|
|
73
78
|
isImageSplash && backgroundImage.source?.startsWith('http')
|
|
74
79
|
? backgroundImage.source
|
|
75
80
|
: undefined;
|
|
76
81
|
|
|
77
|
-
const {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
logoUrl: isRemoteSource ? splashSource : undefined,
|
|
81
|
-
backgroundUrl: backgroundImageUri,
|
|
82
|
+
const { data } = useSplashCache({
|
|
83
|
+
logoUrl: isRemote ? splashSource : undefined,
|
|
84
|
+
backgroundUrl: backgroundImageUrl,
|
|
82
85
|
});
|
|
83
86
|
|
|
84
87
|
const resolvedSplashUri =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
88
|
+
isRemote && data.logoPath ? data.logoPath : splashSource;
|
|
89
|
+
|
|
90
|
+
const displayTimeout = useMemo(() => {
|
|
91
|
+
if (typeof screenTime === 'number' && screenTime > 0) return screenTime;
|
|
92
|
+
if (isImageSplash || isStatic) return DEFAULT_IMAGE_TIMEOUT;
|
|
93
|
+
return 0;
|
|
91
94
|
}, [screenTime, isImageSplash, isStatic]);
|
|
92
95
|
|
|
93
96
|
const handleRedirect = useCallback(() => {
|
|
@@ -99,17 +102,12 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
|
99
102
|
}, [onRedirect]);
|
|
100
103
|
|
|
101
104
|
useEffect(() => {
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
clearTimeout(timer);
|
|
109
|
-
};
|
|
110
|
-
}, [effectiveTimeout, handleRedirect]);
|
|
111
|
-
|
|
112
|
-
const splashComponentProps = useMemo(
|
|
105
|
+
const timeoutSec = displayTimeout > 0 ? displayTimeout : FALLBACK_TIMEOUT;
|
|
106
|
+
const timer = setTimeout(handleRedirect, timeoutSec * 1000);
|
|
107
|
+
return () => clearTimeout(timer);
|
|
108
|
+
}, [displayTimeout, handleRedirect]);
|
|
109
|
+
|
|
110
|
+
const splashProps = useMemo(
|
|
113
111
|
() => ({
|
|
114
112
|
source: resolvedSplashUri,
|
|
115
113
|
width,
|
|
@@ -121,60 +119,71 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
|
|
|
121
119
|
);
|
|
122
120
|
|
|
123
121
|
const renderSplashContent = useCallback(() => {
|
|
122
|
+
const videoExtensions = ['.mp4', '.mov', '.mkv', '.webm', '.avi', '.3gp'];
|
|
123
|
+
const LOTTIE_EXTENSIONS = ['.json', '.lottie'];
|
|
124
124
|
switch (splashType) {
|
|
125
125
|
case 'video':
|
|
126
|
-
|
|
126
|
+
const isVideoFile = videoExtensions.some((ext) =>
|
|
127
|
+
resolvedSplashUri.toLowerCase().endsWith(ext)
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
return isVideoFile ? (
|
|
127
131
|
<SplashVideo
|
|
128
|
-
{...
|
|
129
|
-
onEnd={
|
|
132
|
+
{...splashProps}
|
|
133
|
+
onEnd={displayTimeout ? undefined : handleRedirect}
|
|
130
134
|
/>
|
|
135
|
+
) : null;
|
|
136
|
+
|
|
137
|
+
case 'lottie-animation': {
|
|
138
|
+
const isLottieFile = LOTTIE_EXTENSIONS.some((ext) =>
|
|
139
|
+
resolvedSplashUri.toLowerCase().endsWith(ext)
|
|
131
140
|
);
|
|
132
|
-
|
|
133
|
-
return (
|
|
141
|
+
|
|
142
|
+
return isLottieFile ? (
|
|
134
143
|
<SplashLottie
|
|
135
|
-
{...
|
|
136
|
-
onAnimationFinish={
|
|
144
|
+
{...splashProps}
|
|
145
|
+
onAnimationFinish={displayTimeout ? undefined : handleRedirect}
|
|
137
146
|
/>
|
|
138
|
-
);
|
|
147
|
+
) : null;
|
|
148
|
+
}
|
|
149
|
+
|
|
139
150
|
case 'image':
|
|
140
151
|
default:
|
|
141
|
-
return <SplashImage {...
|
|
152
|
+
return <SplashImage {...splashProps} />;
|
|
142
153
|
}
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
}, [
|
|
155
|
+
splashType,
|
|
156
|
+
resolvedSplashUri,
|
|
157
|
+
splashProps,
|
|
158
|
+
displayTimeout,
|
|
159
|
+
handleRedirect,
|
|
160
|
+
]);
|
|
161
|
+
|
|
162
|
+
/** 🎨 Safe Background Color Calculation */
|
|
163
|
+
const safeBgColor = useMemo(() => {
|
|
148
164
|
try {
|
|
149
|
-
if (!
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (alpha < 0.8) return fallbackColor; // ✅ your condition
|
|
155
|
-
|
|
156
|
-
return parsedColor.hex(); // Always convert to solid hex
|
|
157
|
-
} catch (e) {
|
|
158
|
-
return fallbackColor;
|
|
165
|
+
if (!splashBgColor) return theme.colors.background;
|
|
166
|
+
const c = Color(splashBgColor);
|
|
167
|
+
return c.alpha() < 0.8 ? theme.colors.background : c.hex();
|
|
168
|
+
} catch {
|
|
169
|
+
return theme.colors.background;
|
|
159
170
|
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
)
|
|
165
|
-
const isDark = Color(colorToUse).isDark();
|
|
166
|
-
const statusBarStyle: 'light-content' | 'dark-content' = isDark
|
|
171
|
+
}, [splashBgColor, theme.colors.background]);
|
|
172
|
+
|
|
173
|
+
const statusBarStyle: 'light-content' | 'dark-content' = Color(
|
|
174
|
+
safeBgColor
|
|
175
|
+
).isDark()
|
|
167
176
|
? 'light-content'
|
|
168
177
|
: 'dark-content';
|
|
169
178
|
|
|
170
179
|
return (
|
|
171
180
|
<BackgroundLayout
|
|
172
181
|
backgroundImage={isImageSplash ? backgroundImage.source : undefined}
|
|
173
|
-
backgroundColor={
|
|
182
|
+
backgroundColor={splashBgColor}
|
|
174
183
|
resizeMode={backgroundImage.resizeMode ?? 'cover'}
|
|
175
184
|
innerContainerStyle={innerContainerStyle}
|
|
176
185
|
onImageError={backgroundImage.onImageError}
|
|
177
|
-
theme={
|
|
186
|
+
theme={theme}
|
|
178
187
|
gradientSplitBackground={backgroundImage.gradientSplitBackground ?? 0.4}
|
|
179
188
|
>
|
|
180
189
|
<StatusBar
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified
|
|
3
|
+
* @lastModified Thu 17 Oct 2025
|
|
4
4
|
*/
|
|
5
|
-
import React, {
|
|
6
|
-
import
|
|
5
|
+
import React, { useMemo, useCallback, useState } from 'react';
|
|
6
|
+
import { View, StyleSheet, Animated } from 'react-native';
|
|
7
|
+
import Video from 'react-native-video';
|
|
7
8
|
import Display from '../../../../../utils/Display';
|
|
9
|
+
import { useTheme } from '../../../../../theme';
|
|
8
10
|
|
|
9
11
|
interface IProps {
|
|
10
12
|
width: number;
|
|
@@ -29,9 +31,11 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
29
31
|
onLoaded,
|
|
30
32
|
onError,
|
|
31
33
|
}) => {
|
|
32
|
-
const
|
|
34
|
+
const { theme: applyTheme } = useTheme();
|
|
35
|
+
const [loaded, setLoaded] = useState(false);
|
|
36
|
+
const fadeAnim = useMemo(() => new Animated.Value(0), []);
|
|
33
37
|
|
|
34
|
-
//
|
|
38
|
+
// Video style
|
|
35
39
|
const videoStyle = useMemo(
|
|
36
40
|
() => ({
|
|
37
41
|
width: fullscreen ? Display.fullWidth : width,
|
|
@@ -40,21 +44,31 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
40
44
|
[fullscreen, width, height]
|
|
41
45
|
);
|
|
42
46
|
|
|
43
|
-
//
|
|
47
|
+
// Event handlers
|
|
44
48
|
const handleLoadStart = useCallback(() => {
|
|
49
|
+
setLoaded(false);
|
|
50
|
+
fadeAnim.setValue(0); // Reset fade animation
|
|
45
51
|
onLoadStart?.();
|
|
46
|
-
}, [onLoadStart]);
|
|
52
|
+
}, [onLoadStart, fadeAnim]);
|
|
47
53
|
|
|
48
54
|
const handleLoad = useCallback(
|
|
49
55
|
(data: any) => {
|
|
56
|
+
setLoaded(true);
|
|
57
|
+
|
|
58
|
+
// Fade-in animation
|
|
59
|
+
Animated.timing(fadeAnim, {
|
|
60
|
+
toValue: 1,
|
|
61
|
+
duration: 400, // 0.4s smooth fade
|
|
62
|
+
useNativeDriver: true,
|
|
63
|
+
}).start();
|
|
64
|
+
|
|
50
65
|
onLoaded?.(data);
|
|
51
66
|
},
|
|
52
|
-
[onLoaded]
|
|
67
|
+
[onLoaded, fadeAnim]
|
|
53
68
|
);
|
|
54
69
|
|
|
55
70
|
const handleError = useCallback(
|
|
56
71
|
(e: any) => {
|
|
57
|
-
// More robust error handling
|
|
58
72
|
const error =
|
|
59
73
|
e?.error?.message ||
|
|
60
74
|
e?.message ||
|
|
@@ -62,52 +76,88 @@ const SplashVideo: React.FC<IProps> = ({
|
|
|
62
76
|
e ||
|
|
63
77
|
'Unknown video error';
|
|
64
78
|
console.error('Video playback error:', error);
|
|
79
|
+
setLoaded(false);
|
|
65
80
|
onError?.(error);
|
|
66
81
|
},
|
|
67
82
|
[onError]
|
|
68
83
|
);
|
|
84
|
+
|
|
69
85
|
const resolveUri = (src?: string): string => {
|
|
70
86
|
if (!src) return '';
|
|
71
87
|
if (
|
|
72
88
|
src.startsWith('http') ||
|
|
73
89
|
src.startsWith('https') ||
|
|
74
90
|
src.startsWith('file://')
|
|
75
|
-
)
|
|
91
|
+
) {
|
|
76
92
|
return src;
|
|
93
|
+
}
|
|
77
94
|
return `file://${src}`;
|
|
78
95
|
};
|
|
96
|
+
|
|
79
97
|
return (
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
<View
|
|
99
|
+
style={[
|
|
100
|
+
videoStyle,
|
|
101
|
+
styles.wrapper,
|
|
102
|
+
{ backgroundColor: applyTheme.colors.background },
|
|
103
|
+
]}
|
|
104
|
+
>
|
|
105
|
+
{/* Black background layer */}
|
|
106
|
+
{!loaded && (
|
|
107
|
+
<View
|
|
108
|
+
style={[
|
|
109
|
+
videoStyle,
|
|
110
|
+
styles.blackLayer,
|
|
111
|
+
{ backgroundColor: applyTheme.colors.background },
|
|
112
|
+
]}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
|
|
116
|
+
{/* Animated video */}
|
|
117
|
+
<Animated.View style={[videoStyle, { opacity: fadeAnim }]}>
|
|
118
|
+
<Video
|
|
119
|
+
source={{ uri: resolveUri(source) }}
|
|
120
|
+
style={videoStyle}
|
|
121
|
+
resizeMode={resizeMode}
|
|
122
|
+
paused={false}
|
|
123
|
+
onLoadStart={handleLoadStart}
|
|
124
|
+
onLoad={handleLoad}
|
|
125
|
+
onError={handleError}
|
|
126
|
+
onEnd={onEnd}
|
|
127
|
+
controlsStyles={{
|
|
128
|
+
hideForward: true,
|
|
129
|
+
hideDuration: true,
|
|
130
|
+
hideFullscreen: true,
|
|
131
|
+
hidePlayPause: true,
|
|
132
|
+
hideNavigationBarOnFullScreenMode: true,
|
|
133
|
+
hideNotificationBarOnFullScreenMode: true,
|
|
134
|
+
hideNext: true,
|
|
135
|
+
hidePosition: true,
|
|
136
|
+
hidePrevious: true,
|
|
137
|
+
hideRewind: true,
|
|
138
|
+
hideSeekBar: true,
|
|
139
|
+
hideSettingButton: true,
|
|
140
|
+
}}
|
|
141
|
+
ignoreSilentSwitch="obey"
|
|
142
|
+
playInBackground={false}
|
|
143
|
+
playWhenInactive={false}
|
|
144
|
+
allowsExternalPlayback={false}
|
|
145
|
+
automaticallyWaitsToMinimizeStalling
|
|
146
|
+
/>
|
|
147
|
+
</Animated.View>
|
|
148
|
+
</View>
|
|
110
149
|
);
|
|
111
150
|
};
|
|
112
151
|
|
|
152
|
+
const styles = StyleSheet.create({
|
|
153
|
+
wrapper: {
|
|
154
|
+
overflow: 'hidden',
|
|
155
|
+
},
|
|
156
|
+
blackLayer: {
|
|
157
|
+
...StyleSheet.absoluteFillObject,
|
|
158
|
+
|
|
159
|
+
zIndex: 1,
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
|
|
113
163
|
export default React.memo(SplashVideo);
|
|
@@ -3,20 +3,24 @@
|
|
|
3
3
|
* @lastModified Fri 13 Jun 2025 at 11:11 AM
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import AuthProvider from './AuthProvider/AuthProvider';
|
|
6
7
|
import ForgotPassword from './ForgotPassword/ForgotPassword';
|
|
7
8
|
import LoginWithEmail from './Login/LoginWithEmail';
|
|
8
9
|
import LoginWithPhone from './Login/LoginWithPhone';
|
|
9
10
|
import OTP from './OTP/OTP';
|
|
11
|
+
import QrLogin from './QrLogin/QrLogin';
|
|
10
12
|
import SignUp from './SignUp/SignUp';
|
|
11
13
|
import { SplashScreen } from './SplashScreen/SplashScreen';
|
|
12
14
|
|
|
13
15
|
const Auth = {
|
|
16
|
+
AuthProvider,
|
|
14
17
|
LoginWithEmail,
|
|
15
18
|
LoginWithPhone,
|
|
16
19
|
SignUp,
|
|
17
20
|
OTP,
|
|
18
21
|
ForgotPassword,
|
|
19
22
|
SplashScreen,
|
|
23
|
+
QrLogin,
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
export { Auth };
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
type ImageStyle,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import LinearGradient from 'react-native-linear-gradient';
|
|
10
|
-
import { useInitSplashCacheSync } from '../../hooks/useInitSplashCacheSync';
|
|
11
10
|
import type { ITheme } from '../../theme/themes';
|
|
11
|
+
import { useSplashCache } from '../../hooks/useSplashCache';
|
|
12
12
|
|
|
13
13
|
interface BackgroundLayoutProps {
|
|
14
14
|
children: React.ReactNode;
|
|
@@ -34,8 +34,8 @@ export const BackgroundLayout: React.FC<BackgroundLayoutProps> = (props) => {
|
|
|
34
34
|
} = props;
|
|
35
35
|
|
|
36
36
|
const {
|
|
37
|
-
data: { localPathBackground },
|
|
38
|
-
} =
|
|
37
|
+
data: { backgroundPath: localPathBackground },
|
|
38
|
+
} = useSplashCache({
|
|
39
39
|
backgroundUrl: backgroundImageUri || undefined,
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Ashok Desai
|
|
3
|
+
* @lastModified Mon 06 Oct 2025 at 03:45 PM
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import {
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
ActivityIndicator,
|
|
10
|
+
StyleSheet,
|
|
11
|
+
View,
|
|
12
|
+
type GestureResponderEvent,
|
|
13
|
+
type ViewStyle,
|
|
14
|
+
type TextStyle,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
import { scale, verticalScale } from 'react-native-size-matters';
|
|
17
|
+
import { useTheme } from '../../theme/hook/useTheme';
|
|
18
|
+
import { Text } from '../Text';
|
|
19
|
+
import type { AppTheme } from '../../theme/themes';
|
|
20
|
+
import { RFValue } from 'react-native-responsive-fontsize';
|
|
21
|
+
|
|
22
|
+
type SecondaryBtnProps = {
|
|
23
|
+
title: string;
|
|
24
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
loadingText?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
containerStyle?: ViewStyle;
|
|
29
|
+
titleStyle?: TextStyle;
|
|
30
|
+
theme?: AppTheme;
|
|
31
|
+
leftIcon?: React.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const SecondaryBtn: React.FC<SecondaryBtnProps> = ({
|
|
35
|
+
title,
|
|
36
|
+
onPress,
|
|
37
|
+
loading = false,
|
|
38
|
+
loadingText = 'Loading...',
|
|
39
|
+
disabled = false,
|
|
40
|
+
containerStyle,
|
|
41
|
+
titleStyle,
|
|
42
|
+
leftIcon,
|
|
43
|
+
theme,
|
|
44
|
+
}) => {
|
|
45
|
+
const { theme: appliedTheme } = useTheme(theme);
|
|
46
|
+
|
|
47
|
+
const backgroundColor =
|
|
48
|
+
disabled || loading
|
|
49
|
+
? appliedTheme.colors?.buttonDisabled
|
|
50
|
+
: appliedTheme.colors?.button;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<TouchableOpacity
|
|
54
|
+
onPress={onPress}
|
|
55
|
+
disabled={disabled || loading}
|
|
56
|
+
activeOpacity={0.8}
|
|
57
|
+
style={[styles.button, { backgroundColor }, containerStyle]}
|
|
58
|
+
accessibilityRole="button"
|
|
59
|
+
accessibilityState={{ disabled: disabled || loading }}
|
|
60
|
+
>
|
|
61
|
+
<View style={styles.row}>
|
|
62
|
+
{leftIcon && <View style={{ marginRight: scale(8) }}>{leftIcon}</View>}
|
|
63
|
+
|
|
64
|
+
{loading ? (
|
|
65
|
+
<>
|
|
66
|
+
<ActivityIndicator
|
|
67
|
+
color={appliedTheme.colors.buttonText}
|
|
68
|
+
style={{ marginRight: scale(6) }}
|
|
69
|
+
/>
|
|
70
|
+
<Text
|
|
71
|
+
style={[
|
|
72
|
+
styles.text,
|
|
73
|
+
{ color: appliedTheme.colors.buttonText, opacity: 0.75 },
|
|
74
|
+
titleStyle,
|
|
75
|
+
]}
|
|
76
|
+
>
|
|
77
|
+
{loadingText}
|
|
78
|
+
</Text>
|
|
79
|
+
</>
|
|
80
|
+
) : (
|
|
81
|
+
<Text
|
|
82
|
+
style={[
|
|
83
|
+
styles.text,
|
|
84
|
+
{ color: appliedTheme.colors.buttonText },
|
|
85
|
+
titleStyle,
|
|
86
|
+
]}
|
|
87
|
+
>
|
|
88
|
+
{title}
|
|
89
|
+
</Text>
|
|
90
|
+
)}
|
|
91
|
+
</View>
|
|
92
|
+
</TouchableOpacity>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const styles = StyleSheet.create({
|
|
97
|
+
button: {
|
|
98
|
+
width: '100%',
|
|
99
|
+
alignSelf: 'stretch',
|
|
100
|
+
paddingVertical: verticalScale(12),
|
|
101
|
+
paddingHorizontal: scale(16),
|
|
102
|
+
borderRadius: scale(6),
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
justifyContent: 'center',
|
|
105
|
+
},
|
|
106
|
+
row: {
|
|
107
|
+
flexDirection: 'row',
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
},
|
|
111
|
+
text: {
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
fontSize: RFValue(13),
|
|
114
|
+
fontWeight: '600',
|
|
115
|
+
},
|
|
116
|
+
});
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import BackBtn from './BackBtn';
|
|
7
7
|
import { PrimaryBtn } from './PrimaryBtn';
|
|
8
|
+
import { SecondaryBtn } from './SecondaryBtn';
|
|
8
9
|
import TextButton from './TextButton';
|
|
9
10
|
|
|
10
11
|
const Button = {
|
|
11
12
|
Primary: PrimaryBtn,
|
|
13
|
+
Secondary: SecondaryBtn,
|
|
12
14
|
BackBtn,
|
|
13
15
|
TextButton,
|
|
14
16
|
};
|
|
@@ -36,6 +36,7 @@ import type {
|
|
|
36
36
|
import type { AppTheme, ITheme } from '../../../../theme/themes';
|
|
37
37
|
import { Text } from '../../../Text';
|
|
38
38
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
39
|
+
import RentOrBuyIcon from '../components/RentOrBuyIcon';
|
|
39
40
|
|
|
40
41
|
export interface IHistoryItem {
|
|
41
42
|
_id: string;
|
|
@@ -148,6 +149,9 @@ const NowWatchingItem = memo(
|
|
|
148
149
|
}}
|
|
149
150
|
style={styles.poster}
|
|
150
151
|
>
|
|
152
|
+
<RentOrBuyIcon
|
|
153
|
+
content_offering_type={item.content.content_offering_type}
|
|
154
|
+
/>
|
|
151
155
|
<LinearGradient
|
|
152
156
|
colors={['rgba(0,0,0,0.95)', 'transparent']}
|
|
153
157
|
start={{ x: 0, y: 1 }}
|
|
@@ -22,6 +22,7 @@ import type { IContentData, ISectionContent } from '../../../../../types';
|
|
|
22
22
|
import type { AppTheme } from '../../../../../theme/themes';
|
|
23
23
|
import { useTheme } from '../../../../../theme/hook/useTheme';
|
|
24
24
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
25
|
+
import RentOrBuyIcon from '../../components/RentOrBuyIcon';
|
|
25
26
|
|
|
26
27
|
// Constants
|
|
27
28
|
const DEFAULT_SKELETON_COUNT = 3;
|
|
@@ -89,6 +90,7 @@ const SliderOne: React.FC<SliderOneProps> = ({
|
|
|
89
90
|
({ item }: { item: IContentData }) => (
|
|
90
91
|
<View style={styles.sliderContainer}>
|
|
91
92
|
<ImageTouchable onImagePress={() => onPressItem?.(item)}>
|
|
93
|
+
<RentOrBuyIcon content_offering_type={item.content_offering_type} />
|
|
92
94
|
<FastImage
|
|
93
95
|
source={{
|
|
94
96
|
uri: item.thumbnail,
|
|
@@ -21,6 +21,7 @@ import { ThumbnailCard } from '../../components/ThumbnailCard';
|
|
|
21
21
|
import type { IContentData, ISectionContent } from '../../../../../types';
|
|
22
22
|
import type { AppTheme } from '../../../../../theme/themes';
|
|
23
23
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
24
|
+
import RentOrBuyIcon from '../../components/RentOrBuyIcon';
|
|
24
25
|
|
|
25
26
|
const FULL_WIDTH = Display.fullWidth;
|
|
26
27
|
const FULL_HEIGHT = FULL_WIDTH * (9 / 16);
|
|
@@ -74,6 +75,7 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
74
75
|
accessibilityRole="button"
|
|
75
76
|
accessibilityLabel={`View ${item.name}`}
|
|
76
77
|
>
|
|
78
|
+
<RentOrBuyIcon content_offering_type={item.content_offering_type} />
|
|
77
79
|
<ThumbnailCard
|
|
78
80
|
thumbnailUri={item.thumbnail}
|
|
79
81
|
theme={appliedTheme}
|
|
@@ -134,6 +134,7 @@ const MovieCardFive: React.FC<MovieCardFiveProps> = ({
|
|
|
134
134
|
renderItemImage({ item, index })
|
|
135
135
|
) : (
|
|
136
136
|
<CardPoster
|
|
137
|
+
content_offering_type={item.content_offering_type}
|
|
137
138
|
posterUri={item.poster}
|
|
138
139
|
theme={appliedTheme}
|
|
139
140
|
borderRadius={borderRadius}
|
|
@@ -139,6 +139,7 @@ const MovieCardFour: React.FC<MovieCardFourProps> = ({
|
|
|
139
139
|
renderItemImage({ item, index })
|
|
140
140
|
) : (
|
|
141
141
|
<CardPoster
|
|
142
|
+
content_offering_type={item.content_offering_type}
|
|
142
143
|
posterUri={item.poster}
|
|
143
144
|
theme={appliedTheme}
|
|
144
145
|
borderRadius={borderRadius}
|