[SHOPTIME-3524] 프로모션(리워드) 상품 / 상품 상세 / 할부액 노출 이슈
[수정파일] 1. UnableOption.jsx [수정내용] 1. 프로모션 상품에서 할부 분활금액을 price5가 아닌 rewd에 분할금액으로 수정
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import React, { useCallback, useEffect, useMemo } from "react";
|
||||
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
@@ -78,6 +78,16 @@ export default function UnableOption({
|
||||
};
|
||||
}, [soldoutFlag, productInfo, isLoading]);
|
||||
|
||||
const targetReward = useMemo(() => {
|
||||
if (productInfo) {
|
||||
const rewards = rewd.split("|");
|
||||
const targetReward = rewards[3].trim();
|
||||
|
||||
return targetReward;
|
||||
}
|
||||
|
||||
return null;
|
||||
}, [productInfo]);
|
||||
const handleSMSClick = useCallback(() => {
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.smsPopup));
|
||||
|
||||
@@ -86,6 +96,8 @@ export default function UnableOption({
|
||||
}
|
||||
}, [dispatch, handleMobileSendPopupOpen]);
|
||||
|
||||
console.log("####rewd", rewd);
|
||||
|
||||
const renderPriceItem = useCallback(() => {
|
||||
if (productInfo && !promotionCode) {
|
||||
if (rewd) {
|
||||
@@ -253,10 +265,10 @@ export default function UnableOption({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{price5 && installmentMonths && (
|
||||
{targetReward && installmentMonths && (
|
||||
<div className={css.installedPrc}>
|
||||
{$L("OR {price} with {months}-month financing")
|
||||
.replace("{price}", price5)
|
||||
.replace("{price}", targetReward)
|
||||
.replace("{months}", installmentMonths)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user