From 0e790f59328e158b4e1ca0c3ac9730a9555ef2f8 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 29 Aug 2025 10:44:28 +0000 Subject: [PATCH] Remove netflix-style popup overlay from video cards Remove the experimental Netflix-style popup overlay and associated state management from the VideoCard component, simplifying the UI and improving performance. 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/P3O2FU7 --- client/src/components/video-card.tsx | 54 +--------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/client/src/components/video-card.tsx b/client/src/components/video-card.tsx index 1f53281..5a79f4f 100644 --- a/client/src/components/video-card.tsx +++ b/client/src/components/video-card.tsx @@ -47,9 +47,7 @@ function formatDate(date: Date | string): string { export default function VideoCard({ video, onClick, className = "" }: VideoCardProps) { const [isHovered, setIsHovered] = useState(false); const [showPreview, setShowPreview] = useState(false); - const [showPopup, setShowPopup] = useState(false); const hoverTimeoutRef = useRef(); - const popupTimeoutRef = useRef(); const videoRef = useRef(null); const hlsRef = useRef(null); @@ -89,29 +87,17 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP hoverTimeoutRef.current = setTimeout(() => { setShowPreview(true); }, 800); // Start preview after 800ms hover - - // Show popup after additional delay - popupTimeoutRef.current = setTimeout(() => { - setShowPopup(true); - }, 1200); // Show popup after 1.2s hover } else { if (hoverTimeoutRef.current) { clearTimeout(hoverTimeoutRef.current); } - if (popupTimeoutRef.current) { - clearTimeout(popupTimeoutRef.current); - } setShowPreview(false); - setShowPopup(false); } return () => { if (hoverTimeoutRef.current) { clearTimeout(hoverTimeoutRef.current); } - if (popupTimeoutRef.current) { - clearTimeout(popupTimeoutRef.current); - } }; }, [isHovered]); @@ -173,7 +159,7 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP return (
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > @@ -247,44 +233,6 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
- {/* Netflix-style popup overlay - stays within card */} - {showPopup && ( -
- {/* Action buttons */} -
- - - - -
- - {/* Video info */} -
-

{video.title}

-
- HD - {formatDuration(video.duration)} - {video.category && ( - <> - - {video.category} - - )} -
-
-
- )} ); }