diff options
Diffstat (limited to 'src/containers/settings/AccountScreen.js')
-rw-r--r-- | src/containers/settings/AccountScreen.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index b0354c86b..88ecd55d5 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js | |||
@@ -34,12 +34,17 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
34 | } | 34 | } |
35 | 35 | ||
36 | render() { | 36 | render() { |
37 | const { user, payment } = this.props.stores; | 37 | const { user, payment, features } = this.props.stores; |
38 | const { user: userActions } = this.props.actions; | 38 | const { |
39 | user: userActions, | ||
40 | payment: paymentActions, | ||
41 | } = this.props.actions; | ||
39 | 42 | ||
40 | const isLoadingUserInfo = user.getUserInfoRequest.isExecuting; | 43 | const isLoadingUserInfo = user.getUserInfoRequest.isExecuting; |
41 | const isLoadingPlans = payment.plansRequest.isExecuting; | 44 | const isLoadingPlans = payment.plansRequest.isExecuting; |
42 | 45 | ||
46 | const { upgradeAccount } = paymentActions; | ||
47 | |||
43 | return ( | 48 | return ( |
44 | <ErrorBoundary> | 49 | <ErrorBoundary> |
45 | <AccountDashboard | 50 | <AccountDashboard |
@@ -55,7 +60,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
55 | isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} | 60 | isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} |
56 | isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} | 61 | isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} |
57 | openEditAccount={() => this.handleWebsiteLink('/user/profile')} | 62 | openEditAccount={() => this.handleWebsiteLink('/user/profile')} |
58 | upgradeToPro={() => this.handleWebsiteLink('/inapp/user/licenses')} | 63 | upgradeToPro={() => upgradeAccount({ planId: features.features.pricingConfig.plans.pro.yearly.id })} |
59 | openBilling={() => this.handleWebsiteLink('/user/billing')} | 64 | openBilling={() => this.handleWebsiteLink('/user/billing')} |
60 | openInvoices={() => this.handleWebsiteLink('/user/invoices')} | 65 | openInvoices={() => this.handleWebsiteLink('/user/invoices')} |
61 | /> | 66 | /> |
@@ -74,6 +79,7 @@ AccountScreen.wrappedComponent.propTypes = { | |||
74 | actions: PropTypes.shape({ | 79 | actions: PropTypes.shape({ |
75 | payment: PropTypes.shape({ | 80 | payment: PropTypes.shape({ |
76 | createDashboardUrl: PropTypes.func.isRequired, | 81 | createDashboardUrl: PropTypes.func.isRequired, |
82 | upgradeAccount: PropTypes.func.isRequired, | ||
77 | }).isRequired, | 83 | }).isRequired, |
78 | app: PropTypes.shape({ | 84 | app: PropTypes.shape({ |
79 | openExternalUrl: PropTypes.func.isRequired, | 85 | openExternalUrl: PropTypes.func.isRequired, |