summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/utils/formatValue.js4
-rw-r--r--src/lib/product/components/ProductCard.jsx4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/utils/formatValue.js b/src/core/utils/formatValue.js
index dc78df5b..f2c17769 100644
--- a/src/core/utils/formatValue.js
+++ b/src/core/utils/formatValue.js
@@ -1,7 +1,7 @@
const sellingProductFormat = (value) => {
if (value > 1000) {
- const formattedValue = (value / 1000).toFixed(1).replace('.', ',')
- return `${formattedValue.replace(/\.0$/, '')}rb+`
+ const formattedValue = (value / 1000).toFixed(0).replace('.', ',')
+ return formattedValue + 'rb+';
} else {
return value.toString()
}
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index c60e4f87..317d0c32 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -125,7 +125,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
<div className='flex w-full items-center gap-x-1 '>
{product?.stockTotal > 0 && <div className='badge-solid-red'>Ready Stock</div>}
{/* <div className='badge-gray'>{product?.stockTotal > 5 ? '> 5' : '< 5'}</div> */}
- {product?.qtySold > 0 && <div className='text-gray_r-9 text-sm'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
+ {product?.qtySold > 0 && <div className='text-gray_r-9 text-[11px]'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
</div>
</div>
</div>
@@ -228,7 +228,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
<div className='flex w-full items-center gap-x-1 '>
{product?.stockTotal > 0 && <div className='badge-solid-red'>Ready Stock</div>}
{/* <div className='badge-gray'>{product?.stockTotal > 5 ? '> 5' : '< 5'}</div> */}
- {product?.qtySold > 0 && <div className='text-gray_r-9 text-sm'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
+ {product?.qtySold > 0 && <div className='text-gray_r-9 text-[11px]'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
</div>
</div>
</div>