diff --git a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx index 83f14a61..d469be68 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx @@ -63,6 +63,7 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => { name: panel_names.TRENDING_NOW_PANEL, panelInfo: { pageName: "BS", + focusedContainerId: "trandingnow_bestseller", }, }) ); @@ -89,12 +90,7 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => { return; } }, - [ - cursorVisible, - _handleItemFocus, - handleScrollReset, - scrollTopBody - ] + [cursorVisible, _handleItemFocus, handleScrollReset, scrollTopBody] ); const handleScrollRight = (e) => { @@ -113,7 +109,12 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => { }, [handleItemFocus]); return ( - + { : rankOrd + "th"; return ( { @@ -125,7 +124,12 @@ const PopularShow = ({ }, [handleItemFocus]); return ( - + { if (topInfos && bestSellerDatas) { if (panelInfo?.pageName === "BS") { - Spotlight.focus( - "bs-spotlightId-" + removeDotAndColon(bestSellerDatas[0]?.prdtId) - ); + if (panelInfo?.linkTpCd) { + Spotlight.focus("trandingnow_bestseller"); + } else { + Spotlight.focus(panelInfo?.focusedContainerId); + } } else { if (!firstChk && !panelInfo.currentSpot) { Spotlight.focus("popular_video"); @@ -196,7 +198,15 @@ export default function TrendingNowPanel({ panelInfo, spotlightId }) { } } } - }, [firstChk, panelInfo, topInfos, bestSellerDatas]); + }, [ + firstChk, + topInfos, + bestSellerDatas, + panelInfo?.focusedContainerId, + panelInfo.currentSpot, + panelInfo?.pageName, + panelInfo?.linkTpCd, + ]); const onItemSpotlightDown = useCallback((e) => { e.stopPropagation();