Improve video display by hiding numbers on hover

Update the `CategoryRow` component to hide the "Top 10" number overlay when the mouse leaves the video or when hovering over a different video, and to display the number only when a specific video is not selected.

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 13:05:00 +00:00
parent 74a94cacac
commit 77055dec61

View File

@ -186,7 +186,10 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
}, []);
return (
<div className="relative group mb-8">
<div
className="relative group mb-8"
onMouseLeave={() => setClickedVideoId(null)}
>
<h2 className="text-2xl font-bold text-bunny-light mb-6 px-4">
{category.title}
</h2>
@ -224,12 +227,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
<div
key={video.id}
className="flex-shrink-0 w-[calc(50vw-2px)] sm:w-[calc(33.33vw-2px)] md:w-[calc(25vw-2px)] lg:w-[calc(20vw-2px)] relative group"
onMouseEnter={() => {
// Reset clicked state when hovering over any video
if (clickedVideoId) {
setClickedVideoId(null);
}
}}
onMouseEnter={() => setClickedVideoId(video.id)}
>
{/* Top 10 Number overlay for first category */}
{category.title.includes("Top 10") && index < 10 && clickedVideoId !== video.id && (