[SHOPTIME-3824] VOD / Full 영상 / cc 알럿 노출 / OK 버튼 클릭 / 포커싱 상이

수정 내용: 비디오 재생 시에 home Panel Info에 기존 focus 정보 기록
This commit is contained in:
hyunwoo93.cha
2025-01-22 04:00:38 +09:00
parent 54e7cdcc65
commit e93879c6b7
4 changed files with 22 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ import CustomImage from "../../../components/CustomImage/CustomImage";
import usePriceInfo from "../../../hooks/usePriceInfo";
import { LOG_MENU, LOG_TP_NO, panel_names } from "../../../utils/Config";
import { $L, formatGMTString } from "../../../utils/helperMethods";
import { TEMPLATE_CODE_CONF } from "../HomePanel";
import css from "./RandomUnit.module.less";
const SpottableComponent = Spottable("div");
@@ -353,12 +354,17 @@ export default function RandomUnit({
// 비디오 클릭
const videoClick = useCallback(() => {
const lastFocusedTargetId = getContainerId(Spotlight.getCurrent());
const currentSpot = Spotlight.getCurrent();
if (lastFocusedTargetId) {
dispatch(
updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: { lastFocusedTargetId },
panelInfo: {
lastFocusedTargetId,
focusedContainerId: TEMPLATE_CODE_CONF.TOP,
currentSpot: currentSpot?.getAttribute("data-spotlight-id"),
},
})
);
}

View File

@@ -28,6 +28,7 @@ import CustomImage from "../../../components/CustomImage/CustomImage";
import usePriceInfo from "../../../hooks/usePriceInfo";
import { LOG_MENU, LOG_TP_NO, panel_names } from "../../../utils/Config";
import { $L, formatGMTString } from "../../../utils/helperMethods";
import { TEMPLATE_CODE_CONF } from "../HomePanel";
import css from "./RollingUnit.module.less";
const SpottableComponent = Spottable("div");
@@ -388,12 +389,17 @@ export default function RollingUnit({
const videoClick = useCallback(() => {
const lastFocusedTargetId = getContainerId(Spotlight.getCurrent());
const currentSpot = Spotlight.getCurrent();
if (lastFocusedTargetId) {
dispatch(
updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: { lastFocusedTargetId },
panelInfo: {
lastFocusedTargetId,
focusedContainerId: TEMPLATE_CODE_CONF.TOP,
currentSpot: currentSpot?.getAttribute("data-spotlight-id"),
},
})
);
}

View File

@@ -52,7 +52,7 @@ import PopularShow from "../HomePanel/PopularShow/PopularShow";
import SubCategory from "../HomePanel/SubCategory/SubCategory";
import EventPopUpBanner from "./EventPopUpBanner/EventPopUpBanner";
const TEMPLATE_CODE_CONF = {
export const TEMPLATE_CODE_CONF = {
TOP: "DSP00101",
CATEGORY_ITEM: "DSP00102",
ON_SALE: "DSP00103",

View File

@@ -21,6 +21,7 @@ import useScrollTo from "../../../hooks/useScrollTo";
import { panel_names } from "../../../utils/Config";
import { $L, scaleW } from "../../../utils/helperMethods";
import { SpotlightIds } from "../../../utils/SpotlightIds";
import { TEMPLATE_CODE_CONF } from "../HomePanel";
import css from "../PopularShow/PopularShow.module.less";
const SpottableComponent = Spottable("div");
@@ -62,12 +63,17 @@ const PopularShow = ({
const handleCardClick = useCallback(
(patnrId, showId, catCd, showUrl) => () => {
const lastFocusedTargetId = getContainerId(Spotlight.getCurrent());
const currentSpot = Spotlight.getCurrent();
if (lastFocusedTargetId) {
dispatch(
updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: { lastFocusedTargetId },
panelInfo: {
lastFocusedTargetId,
focusedContainerId: TEMPLATE_CODE_CONF.POPULAR_SHOW,
currentSpot: currentSpot?.getAttribute("data-spotlight-id"),
},
})
);
}