aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/account/AccountDashboard.js8
-rw-r--r--src/containers/settings/AccountScreen.js7
-rw-r--r--src/features/trialStatusBar/containers/TrialStatusBarScreen.js2
3 files changed, 10 insertions, 7 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js
index 776a8fd08..b4ff072ab 100644
--- a/src/components/settings/account/AccountDashboard.js
+++ b/src/components/settings/account/AccountDashboard.js
@@ -242,14 +242,16 @@ class AccountDashboard extends Component {
242 </p> 242 </p>
243 </> 243 </>
244 )} 244 )}
245 <div className="manage-user-links"> 245 {!isProUser && (
246 {!isProUser && ( 246 <div className="manage-user-links">
247 <Button 247 <Button
248 label={intl.formatMessage(messages.upgradeAccountToPro)} 248 label={intl.formatMessage(messages.upgradeAccountToPro)}
249 className="franz-form__button--primary" 249 className="franz-form__button--primary"
250 onClick={upgradeToPro} 250 onClick={upgradeToPro}
251 /> 251 />
252 )} 252 </div>
253 )}
254 <div className="manage-user-links">
253 <Button 255 <Button
254 label={intl.formatMessage(messages.manageSubscriptionButtonLabel)} 256 label={intl.formatMessage(messages.manageSubscriptionButtonLabel)}
255 className="franz-form__button--inverted" 257 className="franz-form__button--inverted"
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,
diff --git a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
index eb0aafaea..15201496b 100644
--- a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
+++ b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js
@@ -67,8 +67,6 @@ class TrialStatusBarScreen extends Component {
67 const { user } = this.props.stores; 67 const { user } = this.props.stores;
68 const { upgradeAccount } = this.props.actions.payment; 68 const { upgradeAccount } = this.props.actions.payment;
69 69
70 console.log('hasEnded', hasEnded);
71
72 return ( 70 return (
73 <ErrorBoundary> 71 <ErrorBoundary>
74 <TrialStatusBar 72 <TrialStatusBar