diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 4337471..84175a1 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -145,10 +145,13 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { let targetScroll; + console.log('Scroll debug:', { direction, currentScroll, maxScroll, scrollAmount }); + if (direction === 'left') { if (currentScroll <= 5) { // Jump to end for infinite loop targetScroll = maxScroll; + console.log('Jumping to end:', targetScroll); } else { targetScroll = Math.max(0, currentScroll - scrollAmount); } @@ -156,6 +159,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { if (currentScroll >= maxScroll - 50) { // Jump to beginning for infinite loop targetScroll = 0; + console.log('Jumping to beginning:', targetScroll); } else { targetScroll = Math.min(maxScroll, currentScroll + scrollAmount); }