[TrendingNow] Home > BestSeller / PopularShow 더보기 버튼으로 진입시 포커스 이슈 처리
This commit is contained in:
@@ -63,6 +63,7 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
|
|||||||
name: panel_names.TRENDING_NOW_PANEL,
|
name: panel_names.TRENDING_NOW_PANEL,
|
||||||
panelInfo: {
|
panelInfo: {
|
||||||
pageName: "BS",
|
pageName: "BS",
|
||||||
|
focusedContainerId: "trandingnow_bestseller",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -89,12 +90,7 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[
|
[cursorVisible, _handleItemFocus, handleScrollReset, scrollTopBody]
|
||||||
cursorVisible,
|
|
||||||
_handleItemFocus,
|
|
||||||
handleScrollReset,
|
|
||||||
scrollTopBody
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleScrollRight = (e) => {
|
const handleScrollRight = (e) => {
|
||||||
@@ -113,7 +109,12 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
|
|||||||
}, [handleItemFocus]);
|
}, [handleItemFocus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className={css.bestSellerWrap} style={orderStyle} spotlightId={spotlightId} data-wheel-point={true}>
|
<Container
|
||||||
|
className={css.bestSellerWrap}
|
||||||
|
style={orderStyle}
|
||||||
|
spotlightId={spotlightId}
|
||||||
|
data-wheel-point={true}
|
||||||
|
>
|
||||||
<SectionTitle
|
<SectionTitle
|
||||||
title={$L("BEST SELLER")}
|
title={$L("BEST SELLER")}
|
||||||
data-title-index="homeBestSellerTitle"
|
data-title-index="homeBestSellerTitle"
|
||||||
@@ -149,7 +150,7 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
|
|||||||
: rankOrd + "th";
|
: rankOrd + "th";
|
||||||
return (
|
return (
|
||||||
<TItemCard
|
<TItemCard
|
||||||
key={"subItem"+itemIndex}
|
key={"subItem" + itemIndex}
|
||||||
imageAlt={prdtId}
|
imageAlt={prdtId}
|
||||||
imageSource={imgUrl}
|
imageSource={imgUrl}
|
||||||
priceInfo={priceInfo}
|
priceInfo={priceInfo}
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ const PopularShow = ({
|
|||||||
pushPanel(
|
pushPanel(
|
||||||
{
|
{
|
||||||
name: panel_names.TRENDING_NOW_PANEL,
|
name: panel_names.TRENDING_NOW_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
pageName: "PS",
|
||||||
|
focusedContainerId: "trandingnow_popularcontainer",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
[dispatch]
|
[dispatch]
|
||||||
)
|
)
|
||||||
@@ -101,12 +105,7 @@ const PopularShow = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[
|
[cursorVisible, _handleItemFocus, handleScrollReset, scrollTopBody]
|
||||||
cursorVisible,
|
|
||||||
_handleItemFocus,
|
|
||||||
handleScrollReset,
|
|
||||||
scrollTopBody
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleScrollRight = (e) => {
|
const handleScrollRight = (e) => {
|
||||||
@@ -125,7 +124,12 @@ const PopularShow = ({
|
|||||||
}, [handleItemFocus]);
|
}, [handleItemFocus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className={css.popularShow} style={orderStyle} spotlightId={spotlightId} data-wheel-point={true}>
|
<Container
|
||||||
|
className={css.popularShow}
|
||||||
|
style={orderStyle}
|
||||||
|
spotlightId={spotlightId}
|
||||||
|
data-wheel-point={true}
|
||||||
|
>
|
||||||
<SectionTitle
|
<SectionTitle
|
||||||
className={css.subTitle}
|
className={css.subTitle}
|
||||||
title={$L("POPULAR SHOW")}
|
title={$L("POPULAR SHOW")}
|
||||||
|
|||||||
@@ -186,9 +186,11 @@ export default function TrendingNowPanel({ panelInfo, spotlightId }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (topInfos && bestSellerDatas) {
|
if (topInfos && bestSellerDatas) {
|
||||||
if (panelInfo?.pageName === "BS") {
|
if (panelInfo?.pageName === "BS") {
|
||||||
Spotlight.focus(
|
if (panelInfo?.linkTpCd) {
|
||||||
"bs-spotlightId-" + removeDotAndColon(bestSellerDatas[0]?.prdtId)
|
Spotlight.focus("trandingnow_bestseller");
|
||||||
);
|
} else {
|
||||||
|
Spotlight.focus(panelInfo?.focusedContainerId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!firstChk && !panelInfo.currentSpot) {
|
if (!firstChk && !panelInfo.currentSpot) {
|
||||||
Spotlight.focus("popular_video");
|
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) => {
|
const onItemSpotlightDown = useCallback((e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|||||||
Reference in New Issue
Block a user