From 4b9baecab0472fb5ee51ec22f1a2e932eb6c4f0f Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Sun, 28 Nov 2021 12:42:05 +0330 Subject: [PATCH] reza fixed one bug --- src/views/Home/Page2/index.js | 15 ++++++++------- src/views/Home/VideoTube/LessonPlayList/index.js | 2 +- src/views/Home/VideoTube/index.js | 7 ++++--- src/views/Home/index.js | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/views/Home/Page2/index.js b/src/views/Home/Page2/index.js index 3fa462e..918c508 100644 --- a/src/views/Home/Page2/index.js +++ b/src/views/Home/Page2/index.js @@ -25,7 +25,9 @@ export default function Page2({ list, page }) { ) ); setVideoPosition( - scroll.doubleLinearFormula(window.scrollY) + window.scrollY > 3 * height + ? scroll.doubleLinearFormula(window.scrollY) + : null ); if (window.scrollY < 2.5 * height) { setBoxPosition({ @@ -144,14 +146,13 @@ export default function Page2({ list, page }) { }; const videoPositionHandler = (scrollY) => { - if(scrollY <= 3 * height){ + if (scrollY <= 3 * height) { setVideoPosition(() => null); - }else if(scrollY > 3 * height && scrollY < 4 * height){ + } else if (scrollY > 3 * height && scrollY < 4 * height) { setVideoPosition(scroll.doubleLinearFormula(scrollY)); - }else{ - + } else { } - } + }; return (
diff --git a/src/views/Home/VideoTube/LessonPlayList/index.js b/src/views/Home/VideoTube/LessonPlayList/index.js index a5312e2..273fbd7 100644 --- a/src/views/Home/VideoTube/LessonPlayList/index.js +++ b/src/views/Home/VideoTube/LessonPlayList/index.js @@ -35,7 +35,7 @@ function LessonPlayList({ return ( <> { -
+
{bookId && (

diff --git a/src/views/Home/VideoTube/index.js b/src/views/Home/VideoTube/index.js index 96cca43..413682e 100644 --- a/src/views/Home/VideoTube/index.js +++ b/src/views/Home/VideoTube/index.js @@ -53,7 +53,7 @@ function VodTube({
0 ? "opacity-0" : "opacity-100", ], " " @@ -104,6 +104,7 @@ function VodTube({ ref={videoListTag} className="pt-2.5 overflow-y-scroll flex flex-col" id="list" + style={{ minHeight: window.innerHeight / 1.5, maxHeight: window.innerHeight / 1.5}} > {localStorage.getItem("bookId") ? categories?.map((video, i) => ( @@ -143,7 +144,7 @@ function VodTube({ )} -
+ {/*

نظرات

@@ -153,7 +154,7 @@ function VodTube({ ))}
- + */}

{/*
diff --git a/src/views/Home/index.js b/src/views/Home/index.js index e3dd901..9816706 100644 --- a/src/views/Home/index.js +++ b/src/views/Home/index.js @@ -14,7 +14,7 @@ export default function Home() { className="flex flex-col bg-white relative w-full rtl" style={{ height: "700vh"}} > - + {/* */}