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 ( <> { -