From 54e7cdcc658ebec73f60cdd94cace1a8fe9f33b2 Mon Sep 17 00:00:00 2001 From: "hyunwoo93.cha" Date: Tue, 21 Jan 2025 20:05:52 +0900 Subject: [PATCH] =?UTF-8?q?[SHOPTIME-3954]=20=EB=AF=B8=EA=B5=AD=20/=20Home?= =?UTF-8?q?=20/=20Popular=20show=20/=20=EC=98=81=EC=83=81=20=EC=A7=84?= =?UTF-8?q?=EC=9E=85=20=ED=9B=84=20=EC=9D=B4=EC=A0=84=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20=ED=8F=AC=EC=BB=A4=EC=8B=B1=20?= =?UTF-8?q?=EC=82=AC=EB=9D=BC=EC=A7=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 수정 내용: popularShow에서 updateHomeInfo -> lastFocusedTargetrId 추가 --- .../src/views/HomePanel/HomePanel.jsx | 6 +----- .../src/views/HomePanel/PopularShow/PopularShow.jsx | 13 +++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index 1241533d..e2ecd02a 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -492,11 +492,7 @@ const HomePanel = ({ isOnTop }) => { }, [dispatch]); useEffect(() => { - if ( - isOnTop && - panelInfo?.focusedContainerId === TEMPLATE_CODE_CONF.TOP && - panelInfo?.lastFocusedTargetId - ) { + if (isOnTop && panelInfo?.lastFocusedTargetId) { Spotlight.focus(panelInfo.lastFocusedTargetId); } }, [isOnTop]); diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index 749ff5c9..896de7fa 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -5,7 +5,9 @@ import { useDispatch, useSelector } from "react-redux"; import Spotlight from "@enact/spotlight"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; import Spottable from "@enact/spotlight/Spottable"; +import { getContainerId } from "@enact/spotlight/src/container"; +import { updateHomeInfo } from "../../../actions/homeActions"; import { pushPanel } from "../../../actions/panelActions"; import { startVideoPlayer } from "../../../actions/playActions"; import SectionTitle from "../../../components/SectionTitle/SectionTitle"; @@ -59,6 +61,17 @@ const PopularShow = ({ const handleCardClick = useCallback( (patnrId, showId, catCd, showUrl) => () => { + const lastFocusedTargetId = getContainerId(Spotlight.getCurrent()); + + if (lastFocusedTargetId) { + dispatch( + updateHomeInfo({ + name: panel_names.HOME_PANEL, + panelInfo: { lastFocusedTargetId }, + }) + ); + } + dispatch( startVideoPlayer({ showId,