[통합로그 No.4] Home Shelf 이동 시 해당 Shelf에 맞는 정보 수집
This commit is contained in:
@@ -77,6 +77,7 @@ export default function RollingUnit({
|
||||
spotlightId,
|
||||
isHorizontal,
|
||||
handleItemFocus,
|
||||
handleShelfFocus,
|
||||
}) {
|
||||
const rollingData = bannerData.bannerDetailInfos;
|
||||
const rollingDataLength = bannerData.bannerDetailInfos.length;
|
||||
@@ -289,6 +290,12 @@ export default function RollingUnit({
|
||||
}, 300);
|
||||
}, []);
|
||||
|
||||
const shelfFocus = useCallback(() => {
|
||||
if (handleShelfFocus) {
|
||||
handleShelfFocus();
|
||||
}
|
||||
}, [handleShelfFocus]);
|
||||
|
||||
const categoryData = useMemo(() => {
|
||||
if (
|
||||
Object.keys(rollingData[startIndex]).length > 0 &&
|
||||
@@ -539,6 +546,7 @@ export default function RollingUnit({
|
||||
isHorizontal && css.isHorizontalWrap
|
||||
)}
|
||||
spotlightId={`container-${spotlightId}`}
|
||||
onFocus={shelfFocus}
|
||||
>
|
||||
{rollingDataLength !== 1 ? (
|
||||
<SpottableComponent
|
||||
|
||||
Reference in New Issue
Block a user