diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 2a61c20..5b07475 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -144,13 +144,16 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { const videoWidth = 120; // Width including spacing const scroll = (direction: 'left' | 'right') => { - // Toggle speed mode on click - setSpeedMode(prev => prev === 'normal' ? 'fast' : 'normal'); - + // Only move one step when clicked (no speed change here) const step = direction === 'right' ? -videoWidth : videoWidth; setTranslateX(prev => prev + step); }; + const toggleSpeed = () => { + // Toggle speed mode without moving + setSpeedMode(prev => prev === 'normal' ? 'fast' : 'normal'); + }; + const startAutoScroll = (direction: 'left' | 'right') => { // Clear any existing interval if (scrollIntervalRef.current) { @@ -214,7 +217,12 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { onClick={(e) => { e.preventDefault(); e.stopPropagation(); - scroll('left'); + // If already scrolling, just toggle speed, otherwise do single scroll + if (isScrolling) { + toggleSpeed(); + } else { + scroll('left'); + } }} onMouseEnter={(e) => { e.stopPropagation(); @@ -235,7 +243,12 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { onClick={(e) => { e.preventDefault(); e.stopPropagation(); - scroll('right'); + // If already scrolling, just toggle speed, otherwise do single scroll + if (isScrolling) { + toggleSpeed(); + } else { + scroll('right'); + } }} onMouseEnter={(e) => { e.stopPropagation();