Improve video navigation by repositioning scroll buttons

Refactors the horizontal scrolling mechanism in the `netflix-grid.tsx` component, replacing broad scroll areas with targeted left and right arrow buttons. These buttons appear on hover and are positioned to prevent interference with video selection.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/7j5FE92
This commit is contained in:
sebastjanartic 2025-08-30 12:58:16 +00:00
parent 6af0b01f23
commit b5f0bcb2ae

View File

@ -191,27 +191,27 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
</h2>
<div className="relative">
{/* Left scroll area - covers left half */}
<div
className="absolute left-0 top-0 w-1/2 h-full z-20 flex items-center justify-start pl-4"
{/* Left scroll button - only on edge */}
<Button
onClick={() => scroll('left')}
onMouseEnter={() => startAutoScroll('left')}
onMouseLeave={stopAutoScroll}
className="absolute left-2 top-1/2 -translate-y-1/2 z-30 bg-black/80 hover:bg-black/95 text-white border-none w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl"
size="sm"
>
<div className="bg-black/60 hover:bg-black/80 text-white w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl cursor-pointer">
<ChevronLeft className="w-6 h-6" />
</div>
</div>
<ChevronLeft className="w-5 h-5" />
</Button>
{/* Right scroll area - covers right half */}
<div
className="absolute right-0 top-0 w-1/2 h-full z-20 flex items-center justify-end pr-4"
{/* Right scroll button - only on edge */}
<Button
onClick={() => scroll('right')}
onMouseEnter={() => startAutoScroll('right')}
onMouseLeave={stopAutoScroll}
className="absolute right-2 top-1/2 -translate-y-1/2 z-30 bg-black/80 hover:bg-black/95 text-white border-none w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl"
size="sm"
>
<div className="bg-black/60 hover:bg-black/80 text-white w-12 h-12 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 flex items-center justify-center shadow-xl cursor-pointer">
<ChevronRight className="w-6 h-6" />
</div>
</div>
<ChevronRight className="w-5 h-5" />
</Button>
{/* Scrollable video row - true edge to edge */}
<div