From 1351f6d6d980df82bdc43f93eccb7fe4af66949b Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Wed, 31 Jan 2024 11:01:09 +0900 Subject: [PATCH] =?UTF-8?q?Components/TItemCard=20-=EA=B8=88=EC=95=A1=20?= =?UTF-8?q?=EB=85=B8=EC=B6=9C=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=ED=95=98=EC=98=80=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TItemCard/TItemCard.jsx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx index f26e4e9b..85e651d8 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx @@ -15,7 +15,7 @@ const TYPE_HORIZONTAL = "horizontal"; const SOLD_OUT_STRING = "SOLD OUT"; const TOP_STRING = "TOP"; -export default memo(function ProductCard({ +export default memo(function TItemCard({ children, imageAlt, imageSource, @@ -27,8 +27,6 @@ export default memo(function ProductCard({ rank, soldoutFlag, type = TYPE_VERTICAL, - accType = false, - offerInfo, ...rest }) { const handleClick = useCallback( @@ -46,9 +44,7 @@ export default memo(function ProductCard({ .map((item) => item.trim()); let originalPrice, discountedPrice, discountRate; - if (priceParts.length === 5) { - [originalPrice, discountedPrice, , discountRate] = priceParts; - } else if (priceParts.length === 4) { + if (priceParts.length === 4) { [originalPrice, discountedPrice, , discountRate] = priceParts; } else if (priceParts.length === 2) { [originalPrice, discountedPrice] = priceParts; @@ -84,14 +80,8 @@ export default memo(function ProductCard({

{productName}

- {offerInfo != "" - ? offerInfo - : discountRate - ? discountedPrice - : originalPrice} - {discountRate && ( - {accType ? originalPrice : discountRate} - )} + {discountRate ? discountedPrice : originalPrice} + {discountRate && {originalPrice}}

{isBestSeller && rank && (