[SHOPTIME-2988] 로딩 추가 및 포커스 수정
This commit is contained in:
@@ -44,10 +44,10 @@ export default function RandomUnit({
|
|||||||
handleItemFocus,
|
handleItemFocus,
|
||||||
randomNumber,
|
randomNumber,
|
||||||
}) {
|
}) {
|
||||||
const bannerDetailInfos = bannerData.bannerDetailInfos;
|
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
const bannerDetailInfos = bannerData.bannerDetailInfos;
|
||||||
|
|
||||||
const shptmTmplCd = useSelector(
|
const shptmTmplCd = useSelector(
|
||||||
(state) => state.home?.bannerData?.shptmTmplCd
|
(state) => state.home?.bannerData?.shptmTmplCd
|
||||||
);
|
);
|
||||||
@@ -72,6 +72,8 @@ export default function RandomUnit({
|
|||||||
const bannerDataRef = useRef(bannerData);
|
const bannerDataRef = useRef(bannerData);
|
||||||
const randomDataRef = useRef(bannerDetailInfos[randomNumber]);
|
const randomDataRef = useRef(bannerDetailInfos[randomNumber]);
|
||||||
|
|
||||||
|
const loadingComplete = useSelector((state) => state.common?.loadingComplete);
|
||||||
|
|
||||||
const topContentsLogInfo = useMemo(() => {
|
const topContentsLogInfo = useMemo(() => {
|
||||||
if (randomDataRef.current) {
|
if (randomDataRef.current) {
|
||||||
const currentRandomData = randomDataRef.current;
|
const currentRandomData = randomDataRef.current;
|
||||||
@@ -325,6 +327,8 @@ export default function RandomUnit({
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
dispatch(finishVideoPreview());
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
sendLogTopContents({
|
sendLogTopContents({
|
||||||
...topContentsLogInfo,
|
...topContentsLogInfo,
|
||||||
@@ -332,7 +336,6 @@ export default function RandomUnit({
|
|||||||
logTpNo: LOG_TP_NO.TOP_CONTENTS.CLICK,
|
logTpNo: LOG_TP_NO.TOP_CONTENTS.CLICK,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
dispatch(finishVideoPreview());
|
|
||||||
}, [dispatch, randomData?.patnrId, randomData?.prdtId, topContentsLogInfo]);
|
}, [dispatch, randomData?.patnrId, randomData?.prdtId, topContentsLogInfo]);
|
||||||
|
|
||||||
// 비디오 클릭
|
// 비디오 클릭
|
||||||
@@ -472,8 +475,8 @@ export default function RandomUnit({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</SpottableComponent>
|
</SpottableComponent>
|
||||||
) : randomData?.shptmBanrTpNm == "LIVE" ||
|
) : (loadingComplete && randomData?.shptmBanrTpNm == "LIVE") ||
|
||||||
randomData?.shptmBanrTpNm == "VOD" ? (
|
(loadingComplete && randomData?.shptmBanrTpNm == "VOD") ? (
|
||||||
<SpottableComponent
|
<SpottableComponent
|
||||||
className={classNames(
|
className={classNames(
|
||||||
css.itemBox,
|
css.itemBox,
|
||||||
|
|||||||
@@ -202,9 +202,9 @@ export default function RollingUnit({
|
|||||||
if (handleItemFocus) {
|
if (handleItemFocus) {
|
||||||
handleItemFocus();
|
handleItemFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
rollingStart(true);
|
rollingStart(true);
|
||||||
setRollingFocus(true);
|
setRollingFocus(true);
|
||||||
|
dispatch(finishVideoPreview());
|
||||||
}, [handleItemFocus, rollingStart]);
|
}, [handleItemFocus, rollingStart]);
|
||||||
|
|
||||||
// 배너 포커스 아웃
|
// 배너 포커스 아웃
|
||||||
|
|||||||
Reference in New Issue
Block a user