Fixed default amounts in tier previews (#19582)

fixes ENG-558
This commit is contained in:
Sag 2024-01-25 18:17:11 +01:00 committed by GitHub
parent 1f90cf7ea9
commit eb189c8045
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,8 +80,8 @@ const TierDetailPreview: React.FC<TierDetailPreviewProps> = ({tier, isFreeTier})
const currencySymbol = currency ? getSymbol(currency) : '$';
const benefits = tier?.benefits || [];
const monthlyPrice = currencyToDecimal(tier?.monthly_price || 0);
const yearlyPrice = currencyToDecimal(tier?.yearly_price || 0);
const monthlyPrice = currencyToDecimal(tier?.monthly_price ?? 500);
const yearlyPrice = currencyToDecimal(tier?.yearly_price ?? 5000);
const yearlyDiscount = tier?.monthly_price && tier?.yearly_price
? Math.ceil(((monthlyPrice * 12 - yearlyPrice) / (monthlyPrice * 12)) * 100)
: 0;