Adjust video display to show the first video on the left
Modify NetflixGrid component to initialize video positioning with the first video on the left side instead of the right. 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/QCN70f2
This commit is contained in:
parent
3041bdecc3
commit
5ad9407ee1
@ -174,12 +174,11 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
||||
}, 12); // Update every 12ms for buttery smooth flow
|
||||
};
|
||||
|
||||
// Initialize with first video on the right side
|
||||
// Initialize with first video on the left side
|
||||
useEffect(() => {
|
||||
if (category.videos.length > 0) {
|
||||
// Position so first video appears on the right side of visible area
|
||||
const rightPosition = -(category.videos.length * videoWidth) + (videoWidth * 4);
|
||||
setTranslateX(rightPosition);
|
||||
// Position so first video appears on the left side of visible area
|
||||
setTranslateX(-category.videos.length * videoWidth);
|
||||
}
|
||||
}, [category.videos.length]);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user