summaryrefslogtreecommitdiff
path: root/src-migrate/modules
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-10-27 11:07:11 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-10-27 11:07:11 +0700
commit3daa8e3faff1bb4b0f2d56b185069300b0bbe8c7 (patch)
treedc90b48cbdac1f43e6066264035e76c81a2a5c0a /src-migrate/modules
parentef91c1c4e3718c01d6c1c5dd621ce5215b514543 (diff)
<Miqdad> update robots dan posisi harga desktop
Diffstat (limited to 'src-migrate/modules')
-rw-r--r--src-migrate/modules/product-detail/components/PriceAction.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx
index f8591b3a..683b679c 100644
--- a/src-migrate/modules/product-detail/components/PriceAction.tsx
+++ b/src-migrate/modules/product-detail/components/PriceAction.tsx
@@ -68,7 +68,7 @@ const PriceAction = ({ product }: Props) => {
const price = activePrice?.price_discount || activePrice?.price || 0;
const pricedigit = String(Math.floor(price)).length;
- const fontSize = pricedigit > 9 ? '20px' : undefined;
+ const fontSize = pricedigit >= 9 ? '20px' : undefined;
// let voucherPastiHemat = 0;
@@ -99,16 +99,16 @@ const PriceAction = ({ product }: Props) => {
<div className={style['disc-badge']}>
{Math.floor(activePrice.discount_percentage)}%
</div>
- <div className={style['disc-price']}>
- Rp {formatCurrency(activePrice.price || 0)}
+ <div
+ className={style['main-price']}
+ style={fontSize ? { fontSize } : undefined}
+ >
+ Rp {formatCurrency(activePrice.price_discount || 0)}
</div>
</>
)}
- <div
- className={style['main-price']}
- style={fontSize ? { fontSize } : undefined}
- >
- Rp {formatCurrency(activePrice.price_discount || 0)}
+ <div className={style['disc-price']}>
+ Rp {formatCurrency(activePrice.price || 0)}
</div>
</div>
<div className='h-1' />