From fc46f7a4cd73f4ea1f7b2d0c2ce955fc2eafdecb Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Wed, 12 Feb 2025 23:34:23 +0100 Subject: [PATCH] fix: videos naming scheme --- src/components/landing-page.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/landing-page.tsx b/src/components/landing-page.tsx index 6f75c7c..14f4e94 100644 --- a/src/components/landing-page.tsx +++ b/src/components/landing-page.tsx @@ -80,9 +80,9 @@ function getSource({ />, , ]; @@ -95,6 +95,8 @@ function Video({ sourceBase, hidden }: { const videoRef = useRef(null); useEffect(() => { + if (!videoRef.current || hidden) return; + console.log('effect running running and running running') const handleScroll = () => { if (!videoRef.current || hidden) return; @@ -106,7 +108,7 @@ function Video({ sourceBase, hidden }: { }; const throttledHandleScroll = () => { - requestAnimationFrame(handleScroll); + // requestAnimationFrame(handleScroll); }; window.addEventListener("scroll", throttledHandleScroll);