mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
parent
1f90cf7ea9
commit
eb189c8045
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user