diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 32ce139..4337471 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -146,14 +146,14 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { let targetScroll; if (direction === 'left') { - if (currentScroll <= 0) { + if (currentScroll <= 5) { // Jump to end for infinite loop targetScroll = maxScroll; } else { targetScroll = Math.max(0, currentScroll - scrollAmount); } } else { - if (currentScroll >= maxScroll - 10) { + if (currentScroll >= maxScroll - 50) { // Jump to beginning for infinite loop targetScroll = 0; } else { @@ -178,10 +178,10 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { const maxScroll = scrollRef.current.scrollWidth - scrollRef.current.clientWidth; const scrollAmount = direction === 'left' ? -3 : 3; // Faster scroll - if (direction === 'left' && currentScroll <= 0) { + if (direction === 'left' && currentScroll <= 5) { // Jump to end for infinite loop scrollRef.current.scrollLeft = maxScroll; - } else if (direction === 'right' && currentScroll >= maxScroll - 5) { + } else if (direction === 'right' && currentScroll >= maxScroll - 50) { // Jump to beginning for infinite loop scrollRef.current.scrollLeft = 0; } else {