From 815ddd37783a15f51ffbe7cb6fea59a7301ef1cd Mon Sep 17 00:00:00 2001
From: JimmFly <447268514@qq.com>
Date: Fri, 23 Feb 2024 08:28:24 +0000
Subject: [PATCH] chore: replace pricing plan link (#5886)
close TOV-609
---
.../general-setting/plans/plan-card.tsx | 19 +++++++++++++++----
packages/frontend/i18n/src/resources/en.json | 1 +
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx
index 5b4636ede5..f7bdf1eac3 100644
--- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx
+++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx
@@ -235,7 +235,7 @@ const ActionButton = ({
// contact
if (detail.type === 'dynamic') {
- return ;
+ return ;
}
// not signed in
@@ -334,17 +334,28 @@ const Downgrade = ({
);
};
-const ContactSales = () => {
+const BookDemo = ({ plan }: { plan: SubscriptionPlan }) => {
const t = useAFFiNEI18N();
+ const url = useMemo(() => {
+ switch (plan) {
+ case SubscriptionPlan.Team:
+ return 'https://6dxre9ihosp.typeform.com/to/niBcdkvs';
+ case SubscriptionPlan.Enterprise:
+ return 'https://6dxre9ihosp.typeform.com/to/rFfobTjf';
+ default:
+ return 'https://affine.pro/pricing';
+ }
+ }, [plan]);
+
return (
);
diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json
index 5a27f56a7b..7dd0e72d30 100644
--- a/packages/frontend/i18n/src/resources/en.json
+++ b/packages/frontend/i18n/src/resources/en.json
@@ -768,6 +768,7 @@
"com.affine.payment.buy-pro": "Buy Pro",
"com.affine.payment.change-to": "Change to {{to}} Billing",
"com.affine.payment.contact-sales": "Contact Sales",
+ "com.affine.payment.book-a-demo": "Book a Demo",
"com.affine.payment.current-plan": "Current Plan",
"com.affine.payment.disable-payment.description": "This is a special testing(Canary) version of AFFiNE. Account upgrades are not supported in this version. If you want to experience the full service, please download the stable version from our website.",
"com.affine.payment.disable-payment.title": "Account Upgrade Unavailable",