Hide video title when preview is actively playing

Conditionally render the video title overlay in VideoCard component based on the `showPreview` state to hide it during active playback previews.

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/DVZN4Rp
This commit is contained in:
sebastjanartic 2025-08-30 14:33:46 +00:00
parent 72e447505c
commit 83cc193eec

View File

@ -205,15 +205,17 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
</div> </div>
)} )}
{/* Title overlay - positioned above duration */} {/* Title overlay - only show when not playing preview */}
<div className="absolute bottom-8 left-2 right-14 bg-black/70 text-white text-sm px-2 py-1 rounded z-10"> {!showPreview && (
<div className="truncate font-medium">{video.title}</div> <div className="absolute bottom-8 left-2 right-14 bg-black/70 text-white text-sm px-2 py-1 rounded z-10">
<div className="text-xs text-white/80 flex items-center space-x-2"> <div className="truncate font-medium">{video.title}</div>
<span>{formatViews(video.views)}</span> <div className="text-xs text-white/80 flex items-center space-x-2">
<span></span> <span>{formatViews(video.views)}</span>
<span>{formatDate(video.createdAt)}</span> <span></span>
<span>{formatDate(video.createdAt)}</span>
</div>
</div> </div>
</div> )}
{/* Duration badge */} {/* Duration badge */}
<div className="absolute bottom-2 right-2 bg-black/70 text-white text-xs px-2 py-1 rounded z-10"> <div className="absolute bottom-2 right-2 bg-black/70 text-white text-xs px-2 py-1 rounded z-10">