aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/AccountScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-10-16 22:24:40 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-10-16 22:24:40 +0200
commit86b692b8e6c9710f216b17a04d96a815a8715387 (patch)
treebb3cc296344440c61fe8dfe32af90e25d4c8200d /src/containers/settings/AccountScreen.js
parentUpdate defaultMessages.json (diff)
downloadferdium-app-86b692b8e6c9710f216b17a04d96a815a8715387.tar.gz
ferdium-app-86b692b8e6c9710f216b17a04d96a815a8715387.tar.zst
ferdium-app-86b692b8e6c9710f216b17a04d96a815a8715387.zip
polishing
Diffstat (limited to 'src/containers/settings/AccountScreen.js')
-rw-r--r--src/containers/settings/AccountScreen.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js
index b0354c86b..b08b52e6f 100644
--- a/src/containers/settings/AccountScreen.js
+++ b/src/containers/settings/AccountScreen.js
@@ -34,12 +34,14 @@ 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 { user: userActions } = this.props.actions;
39 39
40 const isLoadingUserInfo = user.getUserInfoRequest.isExecuting; 40 const isLoadingUserInfo = user.getUserInfoRequest.isExecuting;
41 const isLoadingPlans = payment.plansRequest.isExecuting; 41 const isLoadingPlans = payment.plansRequest.isExecuting;
42 42
43 const { upgradeAccount } = payment;
44
43 return ( 45 return (
44 <ErrorBoundary> 46 <ErrorBoundary>
45 <AccountDashboard 47 <AccountDashboard
@@ -55,7 +57,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
55 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} 57 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting}
56 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} 58 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError}
57 openEditAccount={() => this.handleWebsiteLink('/user/profile')} 59 openEditAccount={() => this.handleWebsiteLink('/user/profile')}
58 upgradeToPro={() => this.handleWebsiteLink('/inapp/user/licenses')} 60 upgradeToPro={() => upgradeAccount({ planId: features.features.pricingConfig.pro.yearly.id })}
59 openBilling={() => this.handleWebsiteLink('/user/billing')} 61 openBilling={() => this.handleWebsiteLink('/user/billing')}
60 openInvoices={() => this.handleWebsiteLink('/user/invoices')} 62 openInvoices={() => this.handleWebsiteLink('/user/invoices')}
61 /> 63 />
@@ -74,6 +76,7 @@ AccountScreen.wrappedComponent.propTypes = {
74 actions: PropTypes.shape({ 76 actions: PropTypes.shape({
75 payment: PropTypes.shape({ 77 payment: PropTypes.shape({
76 createDashboardUrl: PropTypes.func.isRequired, 78 createDashboardUrl: PropTypes.func.isRequired,
79 upgradeAccount: PropTypes.func.isRequired,
77 }).isRequired, 80 }).isRequired,
78 app: PropTypes.shape({ 81 app: PropTypes.shape({
79 openExternalUrl: PropTypes.func.isRequired, 82 openExternalUrl: PropTypes.func.isRequired,