From 69659f301e42da33e83469aabc85dafa04f348ad Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Tue, 11 Nov 2025 15:50:44 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=97=90=EB=84=88=EC=A7=80=20=EB=9D=BC?= =?UTF-8?q?=EB=B2=A8=20=EA=B4=80=EB=A0=A8]=20=EC=8A=A4=ED=83=80=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Titemcard 노출부분 수정과 스타일 수정. --- .../TItemCard/TItemCard.module.less | 2 +- .../components/TItemCard/TItemCard.new.jsx | 32 ++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less index c3ad8c47..dee8ea6e 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.module.less @@ -245,7 +245,7 @@ > p { font-weight: bold; - font-size: 30px; + font-size: 28px; color: @PRIMARY_COLOR_RED; margin-top: 8px; diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx index 346c9372..bee18b35 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx @@ -86,7 +86,7 @@ export const removeDotAndColon = (string) => { }; const parsePrice = (price) => { - return parseFloat(price?.replace(/[^0-9.-]+/g, "") || "0"); + return parseFloat(price?.replace(/[^0-9.-]+/g, "").replace("£","") || "0"); }; const generateMockEnergyLabels = (productId) => { @@ -474,13 +474,19 @@ export default memo(function TItemCardNew({ className={classNames( css.descWrap, catNm && css.hstNmWrap, - parsePrice(originPrice) >= 1000 && - parsePrice(dcPrice) >= 1000 && - (countryCode === "GB" || countryCode === "DE") && + (parsePrice(originalPrice) >= 1000 || parsePrice(originPrice) >= 1000 ) && + (parsePrice(discountedPrice) >= 1000 || parsePrice(dcPrice) >= 1000 ) && + euEnrgLblInfos?.length > 0 && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== null && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined && + countryCode === "GB" && css.labelBox, - parsePrice(originPrice) >= 10000 && - parsePrice(dcPrice) >= 10000 && - (countryCode === "GB" || countryCode === "DE") && + (parsePrice(originalPrice) >= 10000 || parsePrice(originPrice) >= 10000 ) && + (parsePrice(discountedPrice) >= 10000 || parsePrice(dcPrice) >= 10000 ) && + euEnrgLblInfos?.length > 0 && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== null && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined && + countryCode === "GB" && css.labelOverBox )} > @@ -525,11 +531,11 @@ export default memo(function TItemCardNew({ )} {(() => { - const hasValidApiData = + {/* const hasValidApiData = euEnrgLblInfos?.length > 0 && euEnrgLblInfos[0]?.enrgLblIcnUrl !== null && - euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined; - + euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined; */} + const hasValidApiData = true; let energyLabels; if (CURRENT_ENERGY_LABEL_MODE === ENERGY_LABEL_MODE.API_ONLY) { @@ -550,7 +556,11 @@ export default memo(function TItemCardNew({ } return ( - (countryCode === "GB" || countryCode === "DE") && ( + countryCode === "GB" && + (euEnrgLblInfos?.length > 0 && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== null && + euEnrgLblInfos[0]?.enrgLblIcnUrl !== undefined) && + (
{type !== "videoShow" && energyLabels