From 127d1565a68c7815c8b8f775aa61505dd13b00a8 Mon Sep 17 00:00:00 2001 From: "jiwon93.son" Date: Mon, 25 Aug 2025 15:34:41 +0900 Subject: [PATCH] fix Detail page promotion price --- .../components/indicator/Indicator.jsx | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/components/indicator/Indicator.jsx b/com.twin.app.shoptime/src/views/DetailPanel/components/indicator/Indicator.jsx index eca489da..06917e76 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/components/indicator/Indicator.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/components/indicator/Indicator.jsx @@ -312,6 +312,10 @@ function Indicator({ [listImages, selectedIndex, soldoutFlag] ); + const savePrice = parseFloat( + promotionPrcie?.discountAmount.replace(/[^0-9.-]+/g, "") || 0 + ); + const renderThumbnail = useCallback(() => { return (
@@ -346,25 +350,12 @@ function Indicator({

{$L("Launch Event")}

{$L("Promo Code")}

{promotionPrcie?.promotionDate}

-
- {(() => { - const originalPrice = parseFloat( - promotionPrcie?.originalPrice?.replace( - /[^0-9.-]+/g, - "" - ) || 0 - ); - const discountedPrice = parseFloat( - promotionPrcie?.discountedPrice?.replace( - /[^0-9.-]+/g, - "" - ) || 0 - ); - const priceDifference = originalPrice - discountedPrice; - return `$${priceDifference}`; - })()} -
{$L("OFF")} -
+ {savePrice && ( +
+ {`$${savePrice}`} +
{$L("OFF")} +
+ )}
)}