Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: set offer for trial reminder dialog

thecodrr52a81b2d8250
diff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.js
index 422e0ee2d..6599e27d4 100644
--- a/apps/web/src/components/dialogs/buydialog.js
+++ b/apps/web/src/components/dialogs/buydialog.js
@@ -388,7 +388,7 @@ function BuyDialog(props) {
setDiscount(pricingInfo);
}}
/>
- ) : (
+ ) : plan ? null : (
<FeaturesList />
)}
</Flex>
diff --git a/apps/web/src/components/dialogs/reminder-dialog.js b/apps/web/src/components/dialogs/reminder-dialog.js
index 7bf760eb8..4d12aa011 100644
--- a/apps/web/src/components/dialogs/reminder-dialog.js
+++ b/apps/web/src/components/dialogs/reminder-dialog.js
@@ -25,21 +25,26 @@ const reminders = {
<Text as="span" fontWeight="bold" color="primary">
get 30% off
</Text>
+ *
</>
),
- subtitle: "on monthly & yearly plans",
+ subtitle: "*Only for yearly plan",
},
features,
- footer: (
- <Flex bg="bgSecondary" pb={2} justifyContent="center">
- <Button variant="anchor" color="text">
- Can't decide yet? Extend your trial!
- </Button>
- </Flex>
- ),
+ // footer: (
+ // <Flex bg="bgSecondary" pb={2} justifyContent="center">
+ // <Button variant="anchor" color="text">
+ // Can't decide yet? Extend your trial!
+ // </Button>
+ // </Flex>
+ // ),
cta: {
title: "Subscribe now",
- action: () => showBuyDialog("monthly"),
+ action: () => {
+ setTimeout(async () => {
+ await showBuyDialog("yearly", "TRIAL2PRO");
+ }, 0);
+ },
},
},
trialexpiring: {
@@ -56,7 +61,11 @@ const reminders = {
features,
cta: {
title: "Upgrade now",
- action: () => showBuyDialog("monthly"),
+ action: () => {
+ setTimeout(async () => {
+ await showBuyDialog();
+ }, 0);
+ },
},
},
};
@@ -77,8 +86,9 @@ function ReminderDialog(props) {
alignment="center"
positiveButton={{
text: <Flex>{reminder.cta.title}</Flex>,
- onClick: () => {
- if (reminder.cta.action) reminder.cta.action();
+ onClick: async () => {
+ if (reminder.cta.action) await reminder.cta.action();
+
props.onClose(true);
},
}}