[통합로그 No.4] Home Shelf 이동 시 해당 Shelf에 맞는 정보 수집
This commit is contained in:
@@ -26,6 +26,7 @@ export default function HomeBanner({
|
||||
firstSpot,
|
||||
spotlightId,
|
||||
handleItemFocus,
|
||||
handleShelfFocus,
|
||||
}) {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -49,6 +50,12 @@ export default function HomeBanner({
|
||||
}
|
||||
}, [handleItemFocus]);
|
||||
|
||||
const _handleShelfFocus = useCallback(() => {
|
||||
if (handleShelfFocus) {
|
||||
handleShelfFocus();
|
||||
}
|
||||
}, [handleShelfFocus]);
|
||||
|
||||
const defaultFocus = useMemo(() => {
|
||||
if (bannerDataList) {
|
||||
let targetIndex = 0;
|
||||
@@ -102,6 +109,7 @@ export default function HomeBanner({
|
||||
isHorizontal={isHorizontal}
|
||||
key={"banner" + index}
|
||||
spotlightId={"banner" + index}
|
||||
handleShelfFocus={_handleShelfFocus}
|
||||
handleItemFocus={_handleItemFocus}
|
||||
/>
|
||||
) : data.shptmDspyTpNm === "Random" ? (
|
||||
@@ -110,6 +118,7 @@ export default function HomeBanner({
|
||||
isHorizontal={isHorizontal}
|
||||
key={"banner" + index}
|
||||
spotlightId={"banner" + index}
|
||||
handleShelfFocus={_handleShelfFocus}
|
||||
handleItemFocus={_handleItemFocus}
|
||||
randomNumber={data.randomIndex}
|
||||
/>
|
||||
@@ -133,7 +142,7 @@ export default function HomeBanner({
|
||||
</div>
|
||||
);
|
||||
},
|
||||
[_handleItemFocus, bannerDataList]
|
||||
[_handleItemFocus, _handleShelfFocus, bannerDataList]
|
||||
);
|
||||
|
||||
const renderLayout = useCallback(() => {
|
||||
|
||||
Reference in New Issue
Block a user