fix: 선택약관 4차수정 250622

This commit is contained in:
djaco
2025-06-22 22:19:57 +09:00
parent f0418b3c2b
commit 556a0e8456
23 changed files with 4437 additions and 477 deletions

View File

@@ -75,43 +75,43 @@ const HomePanel = ({ isOnTop }) => {
const isGnbOpened = useSelector((state) => state.common.isGnbOpened);
const homeLayoutInfo = useSelector((state) => state.home.layoutData);
const panelInfo = useSelector(
(state) => state.home.homeInfo?.panelInfo ?? {}
(state) => state.home.homeInfo?.panelInfo ?? {},
);
const panels = useSelector((state) => state.panels.panels);
const webOSVersion = useSelector(
(state) => state.common.appStatus?.webOSVersion
(state) => state.common.appStatus?.webOSVersion,
);
const enterThroughGNB = useSelector((state) => state.home.enterThroughGNB);
const defaultFocus = useSelector((state) => state.home.defaultFocus);
const categoryInfos = useSelector(
(state) => state.onSale.homeOnSaleData?.data?.categoryInfos
(state) => state.onSale.homeOnSaleData?.data?.categoryInfos,
);
const categoryItemInfos = useSelector(
(state) => state.main.subCategoryData?.categoryItemInfos
(state) => state.main.subCategoryData?.categoryItemInfos,
);
const { popupVisible, activePopup } = useSelector(
(state) => state.common.popup
(state) => state.common.popup,
);
const eventPopInfosData = useSelector(
(state) => state.event.eventData.eventPopInfo
(state) => state.event.eventData.eventPopInfo,
);
const eventData = useSelector((state) => state.event.eventData);
const eventClickSuccess = useSelector(
(state) => state.event.eventClickSuccess
(state) => state.event.eventClickSuccess,
);
const homeOnSaleInfos = useSelector(
(state) => state.onSale.homeOnSaleData?.data.homeOnSaleInfos
(state) => state.onSale.homeOnSaleData?.data.homeOnSaleInfos,
);
const bestSellerDatas = useSelector(
(state) => state.product.bestSellerData?.bestSeller
(state) => state.product.bestSellerData?.bestSeller,
);
const topInfos = useSelector((state) => state.main.top20ShowData.topInfos);
const isDeepLink = useSelector(
(state) => state.common.deepLinkInfo.isDeepLink
(state) => state.common.deepLinkInfo.isDeepLink,
);
const [btnDisabled, setBtnDisabled] = useState(true);
@@ -120,13 +120,13 @@ const HomePanel = ({ isOnTop }) => {
const [eventPopOpen, setEventPopOpen] = useState(false);
const [nowShelf, setNowShelf] = useState(panelInfo.nowShelf);
const [firstLgCatCd, setFirstLgCatCd] = useState(
panelInfo.currentCatCd ?? null
panelInfo.currentCatCd ?? null,
);
const [cateCd, setCateCd] = useState(panelInfo.currentCatCd ?? null);
const [cateNm, setCateNm] = useState(panelInfo.currentCateName ?? null);
const { entryMenu, nowMenu } = useSelector((state) => state.common.menu);
const [focusedContainerId, setFocusedContainerId] = useState(
panelInfo.focusedContainerId
panelInfo.focusedContainerId,
);
const isInitialRender = useRef(true);
@@ -139,7 +139,7 @@ const HomePanel = ({ isOnTop }) => {
sendLogTotalRecommend({
messageId: LOG_MESSAGE_ID.HOME,
contextName: LOG_CONTEXT_NAME.HOME,
})
}),
);
}
}, [entryMenu, nowMenu]);
@@ -147,7 +147,7 @@ const HomePanel = ({ isOnTop }) => {
const sortedHomeLayoutInfo = useMemo(() => {
if (homeLayoutInfo && homeLayoutInfo.homeLayoutInfo) {
const sorted = [...homeLayoutInfo.homeLayoutInfo].sort(
(x, y) => x.expsOrd - y.expsOrd
(x, y) => x.expsOrd - y.expsOrd,
);
return sorted;
}
@@ -183,7 +183,7 @@ const HomePanel = ({ isOnTop }) => {
panelInfo: {
currentSpot: currentSpot,
},
})
}),
);
dispatch(setShowPopup(ACTIVE_POPUP.exitPopup));
@@ -197,7 +197,7 @@ const HomePanel = ({ isOnTop }) => {
contextName: LOG_CONTEXT_NAME.SHOPTIME,
messageId: LOG_MESSAGE_ID.VIEW_CHANGE,
visible: false,
})
}),
);
}, [dispatch]);
@@ -261,7 +261,7 @@ const HomePanel = ({ isOnTop }) => {
shelfLocation: location,
shelfId: containerId,
shelfTitle: title,
})
}),
);
setNowShelf(containerId);
@@ -271,14 +271,14 @@ const HomePanel = ({ isOnTop }) => {
currentSentMenuRef.current = nowMenu;
}
},
[pageSpotIds, nowShelf, panelInfo.nowShelf]
[pageSpotIds, nowShelf, panelInfo.nowShelf],
);
const handleItemFocus = useCallback(
(containerId, location, title) => () => {
doSendLogGNB(containerId, location, title);
},
[doSendLogGNB]
[doSendLogGNB],
);
const renderPageItem = useCallback(() => {
@@ -298,7 +298,7 @@ const HomePanel = ({ isOnTop }) => {
handleShelfFocus={handleItemFocus(
el.shptmApphmDspyOptCd,
el.expsOrd,
el.shptmApphmDspyOptNm
el.shptmApphmDspyOptNm,
)}
handleItemFocus={handleItemFocus(el.shptmApphmDspyOptCd)}
/>
@@ -320,7 +320,7 @@ const HomePanel = ({ isOnTop }) => {
handleShelfFocus={handleItemFocus(
el.shptmApphmDspyOptCd,
el.expsOrd,
el.shptmApphmDspyOptNm
el.shptmApphmDspyOptNm,
)}
handleItemFocus={handleItemFocus(el.shptmApphmDspyOptCd)}
shelfLocation={el.expsOrd}
@@ -338,7 +338,7 @@ const HomePanel = ({ isOnTop }) => {
handleShelfFocus={handleItemFocus(
el.shptmApphmDspyOptCd,
el.expsOrd,
el.shptmApphmDspyOptNm
el.shptmApphmDspyOptNm,
)}
handleItemFocus={handleItemFocus(el.shptmApphmDspyOptCd)}
shelfLocation={el.expsOrd}
@@ -356,7 +356,7 @@ const HomePanel = ({ isOnTop }) => {
handleShelfFocus={handleItemFocus(
el.shptmApphmDspyOptCd,
el.expsOrd,
el.shptmApphmDspyOptNm
el.shptmApphmDspyOptNm,
)}
handleItemFocus={handleItemFocus(el.shptmApphmDspyOptCd)}
shelfLocation={el.expsOrd}
@@ -374,7 +374,7 @@ const HomePanel = ({ isOnTop }) => {
handleShelfFocus={handleItemFocus(
el.shptmApphmDspyOptCd,
el.expsOrd,
el.shptmApphmDspyOptNm
el.shptmApphmDspyOptNm,
)}
handleItemFocus={handleItemFocus(el.shptmApphmDspyOptCd)}
shelfLocation={el.expsOrd}
@@ -473,7 +473,7 @@ const HomePanel = ({ isOnTop }) => {
cbChangePageRef,
dispatch,
isOnTop,
]
],
);
const bestSellerLoaded = useCallback(() => {
@@ -486,7 +486,7 @@ const HomePanel = ({ isOnTop }) => {
if (isDeepLink || (!panels.length && !panelInfo.focusedContainerId)) {
dispatch(
changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }),
);
dispatch(getHomeMainContents());
dispatch(getHomeLayout());
@@ -495,7 +495,7 @@ const HomePanel = ({ isOnTop }) => {
homeSaleInfosIncFlag: "Y",
categoryIncFlag: "Y",
saleInfosIncFlag: "N",
})
}),
);
dispatch(getTop20Show());
dispatch(getBestSeller(bestSellerLoaded));
@@ -528,8 +528,8 @@ const HomePanel = ({ isOnTop }) => {
tabType: "CAT00102",
filterType: "CAT00202",
},
1
)
1,
),
);
}
}, [categoryInfos, firstLgCatCd, dispatch]);
@@ -544,7 +544,7 @@ const HomePanel = ({ isOnTop }) => {
} else setEventPopOpen(true);
} else setEventPopOpen(false);
},
[webOSVersion]
[webOSVersion],
);
useEffect(() => {
@@ -583,7 +583,7 @@ const HomePanel = ({ isOnTop }) => {
}
const tBody = document.querySelector(
`[data-spotlight-id="${SpotlightIds.HOME_TBODY}"]`
`[data-spotlight-id="${SpotlightIds.HOME_TBODY}"]`,
);
const currentSpot = c && tBody.contains(c) ? targetSpotlightId : null;
@@ -597,7 +597,7 @@ const HomePanel = ({ isOnTop }) => {
currentCateName: targetSpotlightCateNm,
focusedContainerId: focusedContainerIdRef.current,
},
})
}),
);
};
}, [dispatch]);