[통합로그 No.4] Home Shelf 이동 시 해당 Shelf에 맞는 정보 수집

This commit is contained in:
dongyoungKo
2025-05-12 18:04:22 +09:00
parent b68888a3b5
commit 80bcae4cae
10 changed files with 154 additions and 66 deletions

View File

@@ -23,7 +23,13 @@ const Container = SpotlightContainerDecorator(
"div"
);
const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
const BestSeller = ({
order,
scrollTopBody,
spotlightId,
handleItemFocus,
handleShelfFocus,
}) => {
const { getScrollTo, scrollLeft } = useScrollTo();
const { handleScrollReset, handleStopScrolling } = useScrollReset(
scrollLeft,
@@ -134,12 +140,19 @@ const BestSeller = ({ order, scrollTopBody, spotlightId, handleItemFocus }) => {
}
}, [handleItemFocus]);
const _handleShelfFocus = useCallback(() => {
if (handleShelfFocus) {
handleShelfFocus();
}
}, [handleShelfFocus]);
return (
<Container
className={css.bestSellerWrap}
style={orderStyle}
spotlightId={spotlightId}
data-wheel-point={true}
onFocus={_handleShelfFocus}
>
<SectionTitle
title={$L("BEST SELLER")}