From 2fd6fcbd06157a5433aee098db799567b152cfcd Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 26 Oct 2026 16:12:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=87=BC=EC=B8=A0=20=EC=9E=AC=EC=83=9D?= =?UTF-8?q?=20=EB=A9=88=EC=B6=A4=20=ED=91=9C=EC=8B=9C=EB=A5=BC=20effect=20?= =?UTF-8?q?=EC=95=88=20setState=20=EC=97=86=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/Shorts.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/b/Shorts.tsx b/frontend/src/b/Shorts.tsx index 97efac2..c6d4a0d 100644 --- a/frontend/src/b/Shorts.tsx +++ b/frontend/src/b/Shorts.tsx @@ -148,8 +148,8 @@ function ShortsViewer({ items, start, onClose, onAt }: { items: ShortItem[]; sta // 누르기로 멈춘 상태. 다른 영상으로 넘어가면 다시 재생 중으로 const paused = useRef(false) // 보이는 영상이 저절로 재생되지 않음 - const [stalled, setStalled] = useState(false) - const stalledHere = stalled && !ready.has(at) + const [stalledAt, setStalledAt] = useState(-1) + const stalledHere = stalledAt === at && !ready.has(at) // 처음 한 번: 시작 영상으로 맞추고, 뒤 페이지 스크롤을 잠근다 const startRef = useRef(start) @@ -224,8 +224,7 @@ function ShortsViewer({ items, start, onClose, onAt }: { items: ShortItem[]; sta }, [at, items]) useEffect(() => { - setStalled(false) - const t = window.setTimeout(() => setStalled(true), STALL_MS) + const t = window.setTimeout(() => setStalledAt(at), STALL_MS) return () => window.clearTimeout(t) }, [at])