Improve video grid interaction by preventing accidental hiding
Adjusted the `CategoryRow` component in `netflix-grid.tsx` to prevent the video details from hiding when hovering over a different video within the same category row, specifically when a video is already 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:
parent
d550ccb428
commit
6583dfb235
@ -224,7 +224,12 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
<div
|
<div
|
||||||
key={video.id}
|
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"
|
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={() => setClickedVideoId(null)}
|
onMouseEnter={() => {
|
||||||
|
// Only reset if hovering over a different video
|
||||||
|
if (clickedVideoId && clickedVideoId !== video.id) {
|
||||||
|
setClickedVideoId(null);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{/* Top 10 Number overlay for first category */}
|
{/* Top 10 Number overlay for first category */}
|
||||||
{category.title.includes("Top 10") && index < 10 && clickedVideoId !== video.id && (
|
{category.title.includes("Top 10") && index < 10 && clickedVideoId !== video.id && (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user