aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/AccountScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 13:24:17 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 13:24:17 +0100
commit898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de (patch)
tree9816c013f9a9453dae07d9dd8d4a862c77c23064 /src/containers/settings/AccountScreen.js
parentUpgrade to react 16 (diff)
downloadferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.gz
ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.zst
ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.zip
Add React 16 didCatch/ErrorBoundary component
Diffstat (limited to 'src/containers/settings/AccountScreen.js')
-rw-r--r--src/containers/settings/AccountScreen.js35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js
index 5818af0b1..019b3d7d6 100644
--- a/src/containers/settings/AccountScreen.js
+++ b/src/containers/settings/AccountScreen.js
@@ -9,6 +9,7 @@ import AppStore from '../../stores/AppStore';
9import { gaPage } from '../../lib/analytics'; 9import { gaPage } from '../../lib/analytics';
10 10
11import AccountDashboard from '../../components/settings/account/AccountDashboard'; 11import AccountDashboard from '../../components/settings/account/AccountDashboard';
12import ErrorBoundary from '../../components/util/ErrorBoundary';
12 13
13const { BrowserWindow } = remote; 14const { BrowserWindow } = remote;
14 15
@@ -67,22 +68,24 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
67 const isLoadingPlans = payment.plansRequest.isExecuting; 68 const isLoadingPlans = payment.plansRequest.isExecuting;
68 69
69 return ( 70 return (
70 <AccountDashboard 71 <ErrorBoundary>
71 user={user.data} 72 <AccountDashboard
72 orders={payment.orders} 73 user={user.data}
73 isLoading={isLoadingUserInfo} 74 orders={payment.orders}
74 isLoadingOrdersInfo={isLoadingOrdersInfo} 75 isLoading={isLoadingUserInfo}
75 isLoadingPlans={isLoadingPlans} 76 isLoadingOrdersInfo={isLoadingOrdersInfo}
76 userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError} 77 isLoadingPlans={isLoadingPlans}
77 retryUserInfoRequest={() => this.reloadData()} 78 userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError}
78 isCreatingPaymentDashboardUrl={payment.createDashboardUrlRequest.isExecuting} 79 retryUserInfoRequest={() => this.reloadData()}
79 openDashboard={price => this.handlePaymentDashboard(price)} 80 isCreatingPaymentDashboardUrl={payment.createDashboardUrlRequest.isExecuting}
80 openExternalUrl={url => openExternalUrl({ url })} 81 openDashboard={price => this.handlePaymentDashboard(price)}
81 onCloseSubscriptionWindow={() => this.onCloseWindow()} 82 openExternalUrl={url => openExternalUrl({ url })}
82 deleteAccount={userActions.delete} 83 onCloseSubscriptionWindow={() => this.onCloseWindow()}
83 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} 84 deleteAccount={userActions.delete}
84 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} 85 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting}
85 /> 86 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError}
87 />
88 </ErrorBoundary>
86 ); 89 );
87 } 90 }
88} 91}