From a7161b8a8094dbaaa6c5c9b70383637c6c108a54 Mon Sep 17 00:00:00 2001 From: optrader Date: Wed, 17 Dec 2025 15:45:48 +0900 Subject: [PATCH] =?UTF-8?q?[251217]=20fix:=20LiveChannelContents=20?= =?UTF-8?q?=EB=8F=99=EC=98=81=EC=83=81=20=EC=A0=84=ED=99=98=EC=8B=9C=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🕐 커밋 시간: 2025. 12. 17. 15:45:48 📊 변경 통계: • 총 파일: 1개 • 추가: +14줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx --- .../TabContents/LiveChannelContents.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx index f3234e0f..47c3fd4d 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/LiveChannelContents.jsx @@ -23,6 +23,7 @@ export default function LiveChannelContents({ liveInfos, currentTime, setSelectedIndex, + selectedIndex, videoVerticalVisible, currentVideoShowId, tabIndex, @@ -66,6 +67,19 @@ export default function LiveChannelContents({ } }, [isFilteredByPatnr19]); + // currentVideoShowId 변경 시 해당 배너가 보이도록 스크롤 + // (LiveChannelButton에서 PageUp/PageDown으로 동영상 변경 시) + // currentVideoShowId 기반으로 스크롤하면 포커스 이동 없이 배너만 화면에 보임 + useEffect(() => { + if (currentVideoShowId && liveInfos && liveInfos.length > 0 && scrollToRef.current) { + // currentVideoShowId와 일치하는 배너의 인덱스 찾기 + const index = liveInfos.findIndex((item) => item.showId === currentVideoShowId); + if (index !== -1) { + scrollToRef.current({ index, animate: true, focus: false }); + } + } + }, [currentVideoShowId, liveInfos]); + const renderItem = useCallback( ({ index, ...rest }) => { const {