diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index d45ee18..8abd7ae 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -167,19 +167,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { // Use the NEW speed that was just set const currentSpeed = newSpeed === 'fast' ? 3.5 : 2.0; const speed = direction === 'right' ? -currentSpeed : currentSpeed; - const newX = prev + speed; - const totalWidth = category.videos.length * videoWidth; - - // TRUE INFINITE SCROLL - wrap around seamlessly - if (direction === 'right' && newX <= -totalWidth) { - // When moved one full cycle to the right, wrap back to start - return newX + totalWidth; - } else if (direction === 'left' && newX >= totalWidth) { - // When moved one full cycle to the left, wrap back to end - return newX - totalWidth; - } - - return newX; + return prev + speed; }); }, interval); } @@ -199,19 +187,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { // Faster speed for better movement const baseSpeed = 2.0; // Faster speed on hover const speed = direction === 'right' ? -baseSpeed : baseSpeed; - const newX = prev + speed; - const totalWidth = category.videos.length * videoWidth; - - // TRUE INFINITE SCROLL - wrap around seamlessly - if (direction === 'right' && newX <= -totalWidth) { - // When moved one full cycle to the right, wrap back to start - return newX + totalWidth; - } else if (direction === 'left' && newX >= totalWidth) { - // When moved one full cycle to the left, wrap back to end - return newX - totalWidth; - } - - return newX; + return prev + speed; }); }, 16); // Fixed interval - speed controlled by pixel movement only };