Improve video category scrolling functionality with console logging
Update the `CategoryRow` component in `netflix-grid.tsx` to include console logging for scroll direction and translation values within the `scroll` function. Remove unnecessary console log for `CategoryRow` rendering. 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/PxjbXcl
This commit is contained in:
parent
b21206ecc4
commit
479cff5a82
@ -146,7 +146,10 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
const scroll = (direction: 'left' | 'right') => {
|
const scroll = (direction: 'left' | 'right') => {
|
||||||
// Only move one step when clicked (no speed change here)
|
// Only move one step when clicked (no speed change here)
|
||||||
const step = direction === 'right' ? -videoWidth : videoWidth;
|
const step = direction === 'right' ? -videoWidth : videoWidth;
|
||||||
setTranslateX(prev => prev + step);
|
setTranslateX(prev => {
|
||||||
|
console.log(`Scroll ${direction}: ${prev} + ${step} = ${prev + step}`);
|
||||||
|
return prev + step;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleSpeed = (direction: 'left' | 'right') => {
|
const toggleSpeed = (direction: 'left' | 'right') => {
|
||||||
@ -214,8 +217,6 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(`CategoryRow rendering: ${category.title}, videos: ${category.videos.length}`);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative group mb-8">
|
<div className="relative group mb-8">
|
||||||
<h2 className="text-2xl font-bold text-bunny-light mb-6 px-4">
|
<h2 className="text-2xl font-bold text-bunny-light mb-6 px-4">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user