From d545a4de0c09cbb15088d0f75a6f773f2b60aeaa Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Wed, 10 Dec 2025 12:53:48 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=83=81=ED=92=88=20=EC=83=81=EC=84=B8]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - price 파트너사 붙는쪽에 nbcu일 경우 peacoke | ******* 로 들어오는 부분때문에 변경. --- .../ShopByMobilePriceDisplay.jsx | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductOverview/ProductPriceDisplay/ShopByMobilePriceDisplay/ShopByMobilePriceDisplay.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductOverview/ProductPriceDisplay/ShopByMobilePriceDisplay/ShopByMobilePriceDisplay.jsx index a46fb901..05f56851 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductOverview/ProductPriceDisplay/ShopByMobilePriceDisplay/ShopByMobilePriceDisplay.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductOverview/ProductPriceDisplay/ShopByMobilePriceDisplay/ShopByMobilePriceDisplay.jsx @@ -9,6 +9,12 @@ import usePriceInfo from '../../../../../hooks/usePriceInfo'; import { $L } from '../../../../../utils/helperMethods'; import css from './ShopByMobilePriceDisplay.module.less'; +// 파트너명에서 "Peacock | Shop The Moment" 형식일 때 "Peacock"만 추출 +const extractPartnerName = (name) => { + if (!name) return name; + return name.includes(' | ') ? name.split(' | ')[0].trim() : name; +}; + export default function ShopByMobilePriceDisplay({ priceData, priceInfo, @@ -26,6 +32,10 @@ export default function ShopByMobilePriceDisplay({ orderPhnNo, } = priceData; + // 파트너명 정규화 + const cleanPatncNm = useMemo(() => extractPartnerName(patncNm), [patncNm]); + const cleanPatnrName = useMemo(() => extractPartnerName(patnrName), [patnrName]); + const { discountRate, rewardFlag, @@ -50,6 +60,8 @@ export default function ShopByMobilePriceDisplay({ [isOriginalPriceEmpty, isDiscountedPriceEmpty, price5, offerInfo] ); + + const renderPriceItem = useCallback(() => { if (priceData && !promotionCode) { if (rewd) { @@ -57,9 +69,9 @@ export default function ShopByMobilePriceDisplay({
- {patncNm - ? patncNm + " " + $L("Price") + " " - : patnrName + " " + $L("Price") + " "} + {cleanPatncNm + ? cleanPatncNm + " " + $L("Price") + " " + : cleanPatnrName + " " + $L("Price") + " "} {TYPE_CASE.case5 || TYPE_CASE.case8 @@ -95,9 +107,9 @@ export default function ShopByMobilePriceDisplay({ return (
- {patncNm - ? patncNm + " " + $L("Price") - : patnrName + " " + $L("Price")} + {cleanPatncNm + ? cleanPatncNm + " " + $L("Price") + : cleanPatnrName + " " + $L("Price")}
@@ -111,9 +123,9 @@ export default function ShopByMobilePriceDisplay({
- {patncNm - ? patncNm + " " + $L("Price") - : patnrName + $L("Price")} + {cleanPatncNm + ? cleanPatncNm + " " + $L("Price") + : cleanPatnrName + $L("Price")}
{discountRate && Number(discountRate.replace("%", "")) > 4 && ( @@ -140,9 +152,9 @@ export default function ShopByMobilePriceDisplay({
- {patncNm - ? patncNm + " " + $L("Price") - : patnrName + " " + $L("Price")} + {cleanPatncNm + ? cleanPatncNm + " " + $L("Price") + : cleanPatnrName + " " + $L("Price")}
{discountRate && Number(discountRate.replace("%", "")) > 4 && ( @@ -194,7 +206,7 @@ export default function ShopByMobilePriceDisplay({ return (
- {patncNm ? patncNm + " " + $L("Price") : patnrName + $L("Price")} + {cleanPatncNm ? cleanPatncNm + " " + $L("Price") : cleanPatnrName + $L("Price")} {renderPriceItem()}
; -} +} \ No newline at end of file