Compare commits
1 commit
fc46f7a4cd
...
73140f45b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73140f45b9 |
|
|
@ -95,8 +95,6 @@ function Video({ sourceBase, hidden }: {
|
|||
const videoRef = useRef<HTMLVideoElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!videoRef.current || hidden) return;
|
||||
console.log('effect running running and running running')
|
||||
const handleScroll = () => {
|
||||
if (!videoRef.current || hidden) return;
|
||||
|
||||
|
|
@ -108,7 +106,7 @@ function Video({ sourceBase, hidden }: {
|
|||
};
|
||||
|
||||
const throttledHandleScroll = () => {
|
||||
// requestAnimationFrame(handleScroll);
|
||||
requestAnimationFrame(handleScroll);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", throttledHandleScroll);
|
||||
|
|
|
|||
Loading…
Reference in a new issue