ok
This commit is contained in:
@@ -3,7 +3,7 @@ import './Coupon.css'; // Import a CSS file for styling
|
|||||||
|
|
||||||
const Coupon = ({ code, value, period, type, expiration }) => {
|
const Coupon = ({ code, value, period, type, expiration }) => {
|
||||||
// Format the value based on type
|
// 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)
|
// Function to convert expiration to Indonesian date format (dd MMMM yyyy)
|
||||||
const formatExpirationDate = (dateString) => {
|
const formatExpirationDate = (dateString) => {
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ const LinktreePage = ({ data, setModal }) => {
|
|||||||
code={couponDetails?.code || null}
|
code={couponDetails?.code || null}
|
||||||
value={couponDetails?.discountValue}
|
value={couponDetails?.discountValue}
|
||||||
period={couponDetails?.discountPeriods}
|
period={couponDetails?.discountPeriods}
|
||||||
|
type={couponDetails?.type}
|
||||||
expiration={couponDetails?.expirationDate}
|
expiration={couponDetails?.expirationDate}
|
||||||
/>
|
/>
|
||||||
{couponStatus === 200 &&
|
{couponStatus === 200 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user