Improve scrolling behavior in video category rows

Removes console logs from the CategoryRow component in netflix-grid.tsx and simplifies the translateX update logic within the scroll function.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/KcsXLXG
This commit is contained in:
sebastjanartic 2025-08-29 16:45:29 +00:00
parent 5877e65e60
commit 71ca86f99e

View File

@ -146,10 +146,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
const scroll = (direction: 'left' | 'right') => {
// Only move one step when clicked (no speed change here)
const step = direction === 'right' ? -videoWidth : videoWidth;
setTranslateX(prev => {
console.log(`Scroll ${direction}: ${prev} + ${step} = ${prev + step}`);
return prev + step;
});
setTranslateX(prev => prev + step);
};
const toggleSpeed = (direction: 'left' | 'right') => {
@ -229,7 +226,6 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
console.log('LEFT BUTTON CLICKED!');
scroll('left');
}}
onMouseEnter={(e) => {
@ -251,7 +247,6 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
console.log('RIGHT BUTTON CLICKED!');
scroll('right');
}}
onMouseEnter={(e) => {