[홈패널] 스타트 포커스 수정

This commit is contained in:
sungmin.in
2024-04-09 19:21:31 +09:00
parent feda4ef67d
commit e53bea4e67

View File

@@ -63,6 +63,7 @@ export default function HomeBanner({ scrollTop, selectTemplate, order }) {
return Spotlight.focus("banner0" + (i + 1));
}
}
return Spotlight.focus("banner01");
}
// 템플릿2 포커스
if (selectTemplate === "DSP00202") {
@@ -89,6 +90,7 @@ export default function HomeBanner({ scrollTop, selectTemplate, order }) {
}
}
}
return Spotlight.focus("banner03");
}
// 템플릿3 포커스
if (selectTemplate === "DSP00203") {
@@ -115,12 +117,7 @@ export default function HomeBanner({ scrollTop, selectTemplate, order }) {
}
}
}
}
// LIVE, VOD 가 없는 경우 Baner01 or banner01Prev
if (Spotlight.focus("banner01Prev")) {
Spotlight.focus("banner01Prev");
} else {
Spotlight.focus("banner01");
return Spotlight.focus("banner03");
}
};
@@ -145,10 +142,13 @@ export default function HomeBanner({ scrollTop, selectTemplate, order }) {
scrollTop({ animate: false });
}
startFocus();
console.log(homeMainContentsBannerInfos, "메인");
}, [homeMainContentsBannerInfos, dispatch, scrollTop, selectTemplate]);
useEffect(() => {
startFocus();
}, [startFocus]);
const templateBanner = (index) => {
switch (selectTemplate) {
case "DSP00201":