diff options
author | 2019-09-02 11:47:32 +0200 | |
---|---|---|
committer | 2019-09-02 11:47:32 +0200 | |
commit | a7e2742d9269c098c37cc84b81ca9ef4863ec93a (patch) | |
tree | 6c48c5a157c28e303fd091e008857b3cd109ac8e /src/containers | |
parent | Add "see all options" (diff) | |
download | ferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.tar.gz ferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.tar.zst ferdium-app-a7e2742d9269c098c37cc84b81ca9ef4863ec93a.zip |
Add CTA for pro upgrade
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/AccountScreen.js | 3 | ||||
-rw-r--r-- | src/containers/subscription/SubscriptionFormScreen.js | 7 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index 66076504f..f9eae4957 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js | |||
@@ -26,7 +26,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
26 | handleWebsiteLink(route) { | 26 | handleWebsiteLink(route) { |
27 | const { actions, stores } = this.props; | 27 | const { actions, stores } = this.props; |
28 | 28 | ||
29 | const url = `${WEBSITE}${route}?authToken=${stores.user.authToken}&utm_source=app&utm_medium=account_dashboard`; | 29 | const url = stores.user.getAuthURL(`${WEBSITE}${route}?utm_source=app&utm_medium=account_dashboard`); |
30 | 30 | ||
31 | actions.app.openExternalUrl({ url }); | 31 | actions.app.openExternalUrl({ url }); |
32 | } | 32 | } |
@@ -51,6 +51,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
51 | isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} | 51 | isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} |
52 | isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} | 52 | isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} |
53 | openEditAccount={() => this.handleWebsiteLink('/user/profile')} | 53 | openEditAccount={() => this.handleWebsiteLink('/user/profile')} |
54 | upgradeToPro={() => this.handleWebsiteLink('/inapp/user/licenses')} | ||
54 | openBilling={() => this.handleWebsiteLink('/user/billing')} | 55 | openBilling={() => this.handleWebsiteLink('/user/billing')} |
55 | openInvoices={() => this.handleWebsiteLink('/user/invoices')} | 56 | openInvoices={() => this.handleWebsiteLink('/user/invoices')} |
56 | /> | 57 | /> |
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js index 5508c120c..e9e457084 100644 --- a/src/containers/subscription/SubscriptionFormScreen.js +++ b/src/containers/subscription/SubscriptionFormScreen.js | |||
@@ -20,12 +20,7 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre | |||
20 | } = stores; | 20 | } = stores; |
21 | 21 | ||
22 | let hostedPageURL = !user.data.hadSubscription ? features.features.planSelectionURL : features.features.subscribeURL; | 22 | let hostedPageURL = !user.data.hadSubscription ? features.features.planSelectionURL : features.features.subscribeURL; |
23 | const url = new URL(hostedPageURL); | 23 | hostedPageURL = user.getAuthURL(hostedPageURL); |
24 | const params = new URLSearchParams(url.search.slice(1)); | ||
25 | |||
26 | params.append('authToken', user.authToken); | ||
27 | |||
28 | hostedPageURL = `${url.origin}${url.pathname}?${params.toString()}`; | ||
29 | 24 | ||
30 | actions.app.openExternalUrl({ url: hostedPageURL }); | 25 | actions.app.openExternalUrl({ url: hostedPageURL }); |
31 | } | 26 | } |