diff --git a/package-lock.json b/package-lock.json
index 39c605f..3cae53a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5039,9 +5039,9 @@
}
},
"node_modules/@ungap/structured-clone": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
- "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz",
+ "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==",
"dev": true,
"license": "ISC"
},
diff --git a/src/screens/LegalRights/VideoPage/index.tsx b/src/screens/LegalRights/VideoPage/index.tsx
index a51cdff..bdf7c91 100644
--- a/src/screens/LegalRights/VideoPage/index.tsx
+++ b/src/screens/LegalRights/VideoPage/index.tsx
@@ -1,6 +1,7 @@
-import { useEffect, useRef, useState } from 'react';
+import React, { useEffect, useRef, useState } from 'react';
import { Image, Pressable, Text, View } from 'react-native';
import { useVideoPlayer, VideoView } from 'expo-video';
+import { useFocusEffect } from '@react-navigation/native';
import leftArrow from '@/assets/images/left-arrow.png';
import rightArrow from '@/assets/images/right-arrow.png';
import { LegalScreenProps } from '@/navigation/types';
@@ -65,11 +66,32 @@ export default function VideoPage({
} catch {
setTitle('Title');
}
- }, [index]); // run useEffect every time value of index changes
+ }, [index]);
+
+ // useFocusEffect(
+ // React.useCallback(() => {
+ // if (playerRef.current) {
+ // playerRef.current.play();
+ // }
+
+ // return () => {
+ // if (playerRef.current) {
+ // playerRef.current.pause?.(); // Safe check for pause
+ // }
+ // };
+ // }, []),
+ // );
return (
-
+
Back
@@ -87,7 +109,14 @@ export default function VideoPage({
/>
-
+
Next
diff --git a/src/screens/LegalRights/VideoPage/styles.ts b/src/screens/LegalRights/VideoPage/styles.ts
index fa1154b..bbbb4d4 100644
--- a/src/screens/LegalRights/VideoPage/styles.ts
+++ b/src/screens/LegalRights/VideoPage/styles.ts
@@ -39,6 +39,9 @@ export const styles = StyleSheet.create({
alignItems: 'center',
boxShadow: '0px 2px 10px 1px rgba(0, 0, 0, 0.10)',
},
+ noButton: {
+ opacity: 0,
+ },
buttonText: {
fontSize: 16,
fontWeight: '500',