From 3f9e79496a67abba709ad2bb5f1ed62985908f67 Mon Sep 17 00:00:00 2001 From: Developer Date: Wed, 11 Mar 2026 14:36:07 +0800 Subject: [PATCH] refactor: deduplicate inline styles and document fetch effect dependency in BigVideoCard --- components/BigVideoCard.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/BigVideoCard.tsx b/components/BigVideoCard.tsx index fb1e45e..c8a0943 100644 --- a/components/BigVideoCard.tsx +++ b/components/BigVideoCard.tsx @@ -27,6 +27,7 @@ interface Props { export function BigVideoCard({ item, isVisible, onPress }: Props) { const { width: SCREEN_W } = useWindowDimensions(); const THUMB_H = SCREEN_W * 0.5625; + const mediaDimensions = { width: SCREEN_W - 8, height: THUMB_H }; const [videoUrl, setVideoUrl] = useState(); const [isDash, setIsDash] = useState(false); @@ -72,6 +73,7 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { console.warn('BigVideoCard: failed to load play URL', e); } })(); + // videoUrl intentionally excluded — re-fetch guard prevents redundant fetches after URL is set }, [isVisible, item.bvid]); // Pause/resume when visibility changes @@ -97,12 +99,12 @@ export function BigVideoCard({ item, isVisible, onPress }: Props) { return ( {/* Media area */} - + {/* Thumbnail */}