홈 패널 돌아오는 부분 이상 처리건

This commit is contained in:
junghoon86.park
2024-05-23 10:44:10 +09:00
parent 1a0c5bd348
commit d57529b787
2 changed files with 19 additions and 15 deletions

View File

@@ -158,6 +158,9 @@ export default function HomePanel({ isOnTop }) {
setTimeout(() => {
Spotlight.resume();
scrollTopBody({ y, animate: false }); //call again after some seconds
if (homeSpotlight.currentCatCd) {
Spotlight.focus("spotlightId-" + homeSpotlight.currentCatCd);
}
if (homeSpotlight.currentSpot) {
Spotlight.focus(homeSpotlight.currentSpot);
}

View File

@@ -118,26 +118,27 @@ const SubCategory = ({ order, scrollTopBody, catCd }) => {
true
);
useEffect(() => {
if (currentLgCatCd && firstChk) {
dispatch(
getSubCategory(
{
lgCatCd: currentLgCatCd,
pageSize: "10",
tabType: "CAT00102",
filterType: "CAT00202",
},
1
)
);
if (currentLgCatCd) {
if (firstChk) {
dispatch(
getSubCategory(
{
lgCatCd: currentLgCatCd,
pageSize: "10",
tabType: "CAT00102",
filterType: "CAT00202",
},
1
)
);
}
setDrawChk(true);
}
}, [currentLgCatCd, dispatch]);
useEffect(() => {
if (categoryItemInfos) {
const prdtId = categoryItemInfos?.subCatItemList.prdtId;
const prdtId = categoryItemInfos?.subCatItemList[0].prdtId;
setTargetId("spotlightId-" + removeDotAndColon(prdtId));
}
}, [categoryItemInfos]);
@@ -237,7 +238,7 @@ const SubCategory = ({ order, scrollTopBody, catCd }) => {
onBlur={() => handleBlur(itemIndex)}
onClick={(e) => handleCardClick(e, patnrId, prdtId)}
offerInfo={offerInfo}
data-catcd-num={lgCatCd}
data-catcd-num={currentLgCatCd}
/>
);
}