From d1646302001fabc75ecb594321fe6443549af01c Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Mon, 8 Dec 2025 14:01:21 +0900 Subject: [PATCH] =?UTF-8?q?[homepanel]=20=20-=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EC=95=BD=EA=B4=80=20=EB=8F=99=EC=9D=98,=20=EB=B9=84=EB=8F=99?= =?UTF-8?q?=EC=9D=98=EC=8B=9C=20=ED=8C=9D=EC=97=85=20=EB=8B=AB=ED=9E=8C=20?= =?UTF-8?q?=EB=92=A4=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC.=20=20-=20settimeout100=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?home=5Ftbody=EB=A1=9C=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=A4=8C?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/HomePanel/HomePanel.jsx | 142 ++++++++++-------- 1 file changed, 81 insertions(+), 61 deletions(-) diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx index 0e024f02..6c05d32e 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx @@ -1,8 +1,16 @@ -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import React, { + useCallback, + useEffect, + useMemo, + useRef, + useState, +} from 'react'; import classNames from 'classnames'; -import { useDispatch, useSelector } from 'react-redux'; -import { types } from '../../actions/actionTypes'; +import { + useDispatch, + useSelector, +} from 'react-redux'; import { applyMiddleware } from 'redux'; import Spotlight from '@enact/spotlight'; @@ -11,53 +19,6 @@ import { setContainerLastFocusedElement, } from '@enact/spotlight/src/container'; -import { - changeAppStatus, - setDeepLink, - setExitApp, - setHidePopup, - setShowPopup, - setOptionalTermsPopupShown, - updateOptionalTermsAgreement, -} from '../../actions/commonActions'; -import { getWelcomeEventInfo } from '../../actions/eventActions'; -import { - checkEnterThroughGNB, - getHomeLayout, - getHomeMainContents, - updateHomeInfo, - // <<<<<<< HEAD -} from '../../actions/homeActions'; -import { setMyPageTermsAgree } from '../../actions/myPageActions'; -import { sendLogGNB, sendLogTotalRecommend } from '../../actions/logActions'; -import { getSubCategory, getTop20Show } from '../../actions/mainActions'; -import { getHomeOnSaleInfo } from '../../actions/onSaleActions'; -import { updatePanel } from '../../actions/panelActions'; -import { - showModalVideo, - finishVideoPreview, - hideModalVideo, - startVideoPlayerNew, -} from '../../actions/playActions'; -import { getBestSeller } from '../../actions/productActions'; -import TBody from '../../components/TBody/TBody'; -import TButton, { TYPES } from '../../components/TButton/TButton'; -import OptionalConfirm from '../../components/Optional/OptionalConfirm'; -import TNewPopUp from '../../components/TPopUp/TNewPopUp'; -import TPanel from '../../components/TPanel/TPanel'; -import TPopUp from '../../components/TPopUp/TPopUp'; -import TVerticalPagenator from '../../components/TVerticalPagenator/TVerticalPagenator'; -import useDebugKey from '../../hooks/useDebugKey'; -import { useFocusHistory } from '../../hooks/useFocusHistory/useFocusHistory'; -import usePrevious from '../../hooks/usePrevious'; -import { useVideoPlay } from '../../hooks/useVideoPlay/useVideoPlay'; -import ImagePreloader from '../../utils/ImagePreloader'; -import { createDebugHelpers } from '../../utils/debug'; - -// 디버그 헬퍼 설정 -const DEBUG_MODE = false; -const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE); - // DetailPanelBackground 이미지 imports for preloading import hsn from '../../../assets/images/bg/hsn_new.png'; import koreaKiosk from '../../../assets/images/bg/koreaKiosk_new.png'; @@ -66,17 +27,53 @@ import ontv4u from '../../../assets/images/bg/ontv4u_new.png'; import Pinkfong from '../../../assets/images/bg/Pinkfong_new.png'; import qvc from '../../../assets/images/bg/qvc_new.png'; import shoplc from '../../../assets/images/bg/shoplc_new.png'; - -// 파트너사별 배경 이미지 맵 -const BACKGROUND_IMAGES = { - 1: qvc, // QVC - 2: hsn, // HSN - 4: ontv4u, // ONTV - 9: lgelectronics, // LG ELECTRONICS - 11: shoplc, // SHOPLC - 16: koreaKiosk, // KOREA KIOSK - 19: Pinkfong, // PINKFONG -}; +import { types } from '../../actions/actionTypes'; +import { + changeAppStatus, + setDeepLink, + setExitApp, + setHidePopup, + setOptionalTermsPopupShown, + setShowPopup, + updateOptionalTermsAgreement, +} from '../../actions/commonActions'; +import { getWelcomeEventInfo } from '../../actions/eventActions'; +import { + checkEnterThroughGNB, + getHomeLayout, + getHomeMainContents, + updateHomeInfo, +} from '../../actions/homeActions'; +import { + sendLogGNB, + sendLogTotalRecommend, +} from '../../actions/logActions'; +import { + getSubCategory, + getTop20Show, +} from '../../actions/mainActions'; +import { setMyPageTermsAgree } from '../../actions/myPageActions'; +import { getHomeOnSaleInfo } from '../../actions/onSaleActions'; +import { updatePanel } from '../../actions/panelActions'; +import { + finishVideoPreview, + hideModalVideo, + showModalVideo, + startVideoPlayerNew, +} from '../../actions/playActions'; +import { getBestSeller } from '../../actions/productActions'; +import OptionalConfirm from '../../components/Optional/OptionalConfirm'; +import TBody from '../../components/TBody/TBody'; +import TButton, { TYPES } from '../../components/TButton/TButton'; +import TPanel from '../../components/TPanel/TPanel'; +import TNewPopUp from '../../components/TPopUp/TNewPopUp'; +import TPopUp from '../../components/TPopUp/TPopUp'; +import TVerticalPagenator + from '../../components/TVerticalPagenator/TVerticalPagenator'; +import useDebugKey from '../../hooks/useDebugKey'; +import { useFocusHistory } from '../../hooks/useFocusHistory/useFocusHistory'; +import usePrevious from '../../hooks/usePrevious'; +import { useVideoPlay } from '../../hooks/useVideoPlay/useVideoPlay'; // [COMMENTED OUT] useVideoMove 관련 코드 주석 처리 - 향후 사용 검토 필요 // import { useVideoMove } from '../../hooks/useVideoTransition/useVideoMove'; // ======= @@ -100,7 +97,9 @@ import { LOG_MESSAGE_ID, panel_names, } from '../../utils/Config'; +import { createDebugHelpers } from '../../utils/debug'; import { $L } from '../../utils/helperMethods'; +import ImagePreloader from '../../utils/ImagePreloader'; import { SpotlightIds } from '../../utils/SpotlightIds'; import BestSeller from '../HomePanel/BestSeller/BestSeller'; import HomeBanner from '../HomePanel/HomeBanner/HomeBanner'; @@ -111,6 +110,21 @@ import SubCategory from '../HomePanel/SubCategory/SubCategory'; import EventPopUpBanner from './EventPopUpBanner/EventPopUpBanner'; import PickedForYou from './PickedForYou/PickedForYou'; +// 디버그 헬퍼 설정 +const DEBUG_MODE = false; +const { dlog, dwarn, derror } = createDebugHelpers(DEBUG_MODE); + +// 파트너사별 배경 이미지 맵 +const BACKGROUND_IMAGES = { + 1: qvc, // QVC + 2: hsn, // HSN + 4: ontv4u, // ONTV + 9: lgelectronics, // LG ELECTRONICS + 11: shoplc, // SHOPLC + 16: koreaKiosk, // KOREA KIOSK + 19: Pinkfong, // PINKFONG +}; + export const TEMPLATE_CODE_CONF = { TOP: 'DSP00101', CATEGORY_ITEM: 'DSP00102', @@ -399,6 +413,9 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { optionalTerms: 'Y', }, }); + setTimeout(()=>{ + Spotlight.focus('home_tbody'); + },100) }, [handleOptionalAgree, dispatch, currentTermsFlag]); const handleOptionalDeclineClick = useCallback(() => { @@ -407,6 +424,9 @@ const HomePanel = ({ isOnTop, showGradientBackground = false }) => { } dispatch(updateOptionalTermsAgreement(false)); setIsOptionalConfirmVisible(false); + setTimeout(()=>{ + Spotlight.focus('home_tbody'); + },100) }, [dispatch]); const handleTermsPopupClosed = useCallback(() => {