[DetailPanel] hotel mobilSendPopUp error

This commit is contained in:
고동영
2024-05-31 15:23:46 +09:00
parent d9f446a443
commit 80f1967f6f
2 changed files with 25 additions and 28 deletions

View File

@@ -197,18 +197,31 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
const mobileSendPopUpProductImg = useMemo(() => {
if (type === "theme" && themeProductInfos) {
return themeProductInfos[selectedIndex]?.imgUrls600[0];
} else if (type === "hotel" && hotelInfos) {
return hotelInfos[selectedIndex]?.hotelImgUrl;
} else {
return productData?.imgUrls600[0];
}
}, [themeProductInfos, selectedIndex, productData, type]);
}, [themeProductInfos, hotelInfos, selectedIndex, productData, type]);
const mobileSendPopUpSubtitle = useMemo(() => {
if (type === "theme") {
if (type === "theme" && themeProductInfos) {
return themeProductInfos[selectedIndex]?.prdtNm;
} else if (type === "hotel" && hotelInfos) {
return hotelInfos[selectedIndex]?.hotelNm;
} else {
return productData?.prdtNm;
}
}, [themeProductInfos, selectedIndex, productData, type]);
}, [themeProductInfos, hotelInfos, selectedIndex, productData, type]);
const Price = () => {
return (
<>
{hotelInfos[selectedIndex]?.hotelDetailInfo.currencySign}
{hotelInfos[selectedIndex]?.hotelDetailInfo.price}
</>
);
};
useEffect(() => {
getlgCatCd();
@@ -346,7 +359,13 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
productImg={mobileSendPopUpProductImg}
patnrId={patnrId}
prdtId={prdtId}
smsTpCd={"APP00201"}
smsTpCd={type === "hotel" ? "APP00205" : "APP00201"}
curationId={curationId}
curationNm={curationNm}
hotelId={hotelInfos[selectedIndex]?.hotelId}
hotelNm={hotelInfos[selectedIndex]?.hotelNm}
hotelDtlUrl={hotelInfos[selectedIndex]?.hotelDetailInfo?.hotelDtlUrl}
productPrice={Price()}
logParams={logParamsRef.current}
/>
)}