mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-09 01:47:11 +03:00
fix(core): adjust discount display (#4847)
This commit is contained in:
parent
cfffcad1b8
commit
acf0734c95
@ -53,10 +53,9 @@ const Settings = () => {
|
||||
if (detail?.type === 'fixed') {
|
||||
detail.price = (price.amount / 100).toFixed(2);
|
||||
detail.yearlyPrice = (price.yearlyAmount / 100 / 12).toFixed(2);
|
||||
detail.discount = (
|
||||
(1 - price.yearlyAmount / 12 / price.amount) *
|
||||
100
|
||||
).toFixed(2);
|
||||
detail.discount = Math.floor(
|
||||
(1 - price.yearlyAmount / 12 / price.amount) * 100
|
||||
).toString();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user