{type === 'amount' &&
{
{renderCurrencyValue(value)}
} {off}
}
{type === 'fixed-price' &&
For{
{renderCurrencyValue(value)}
}
}
{
//@ts-ignore
!(['amount' as const, 'fixed-price' as const]).includes(type!) && value
}
{type === 'percentage' &&
% {off}}
;
}
const renderDiscountValue = () => {
if (type === 'percentage') {
return renderOfferMainValue(amount, 'percentage');
}
if (type === 'amount') {
return renderOfferMainValue(amount, 'amount');
}
if (type === 'finalCost') {
return renderOfferMainValue(amount, 'fixed-price');
}
// amount or fixed-price
return