Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): adjust discount display (#4847)

JimmFlyacf0734c9595
diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/index.tsx
index 646cf620b7..724d4f0fbd 100644
--- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/index.tsx
+++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/index.tsx
@@ -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();
}
});