[SHOPTIME-3954] 미국 / Home / Popular show / 영상 진입 후 이전 버튼 클릭시 포커싱 사라짐
수정 내용: popularShow에서 updateHomeInfo -> lastFocusedTargetrId 추가
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user