This commit is contained in:
zadit
2025-01-29 07:16:00 +07:00
parent 8c07875590
commit a4aae5bf08
2 changed files with 2 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ import './Coupon.css'; // Import a CSS file for styling
const Coupon = ({ code, value, period, type, expiration }) => {
// Format the value based on type
const formattedValue = type == 'fixed' ? `Rp ${value}` : value != 0 ? `${value}%` : 'kupon berlangganan';
const formattedValue = type == 'fixed' ? `Diskon Rp${value}` : value != 0 ? `Diskon${value}%` : 'kupon berlangganan';
// Function to convert expiration to Indonesian date format (dd MMMM yyyy)
const formatExpirationDate = (dateString) => {

View File

@@ -131,6 +131,7 @@ const LinktreePage = ({ data, setModal }) => {
code={couponDetails?.code || null}
value={couponDetails?.discountValue}
period={couponDetails?.discountPeriods}
type={couponDetails?.type}
expiration={couponDetails?.expirationDate}
/>
{couponStatus === 200 &&