diff options
author | 2018-12-09 01:01:12 +0100 | |
---|---|---|
committer | 2018-12-09 01:01:12 +0100 | |
commit | f01957203f77fce8b65d5e034a8acd68f1e0ae2e (patch) | |
tree | 2f8d0d232266cdc7ed74e1913b270527f46bb33d /src/components/settings/account/AccountDashboard.js | |
parent | Add dark mode styles to content tabs (diff) | |
download | ferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.tar.gz ferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.tar.zst ferdium-app-f01957203f77fce8b65d5e034a8acd68f1e0ae2e.zip |
Upgrade to react 16
TODO: add componentDidCatch
Diffstat (limited to 'src/components/settings/account/AccountDashboard.js')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 06c7074dd..43b8387c6 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component, Fragment } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | 4 | import { defineMessages, intlShape } from 'react-intl'; |
@@ -132,21 +132,19 @@ export default @observer class AccountDashboard extends Component { | |||
132 | )} | 132 | )} |
133 | 133 | ||
134 | {!isLoading && userInfoRequestFailed && ( | 134 | {!isLoading && userInfoRequestFailed && ( |
135 | <div> | 135 | <Infobox |
136 | <Infobox | 136 | icon="alert" |
137 | icon="alert" | 137 | type="danger" |
138 | type="danger" | 138 | ctaLabel={intl.formatMessage(messages.tryReloadUserInfoRequest)} |
139 | ctaLabel={intl.formatMessage(messages.tryReloadUserInfoRequest)} | 139 | ctaLoading={isLoading} |
140 | ctaLoading={isLoading} | 140 | ctaOnClick={retryUserInfoRequest} |
141 | ctaOnClick={retryUserInfoRequest} | 141 | > |
142 | > | 142 | {intl.formatMessage(messages.userInfoRequestFailed)} |
143 | {intl.formatMessage(messages.userInfoRequestFailed)} | 143 | </Infobox> |
144 | </Infobox> | ||
145 | </div> | ||
146 | )} | 144 | )} |
147 | 145 | ||
148 | {!userInfoRequestFailed && ( | 146 | {!userInfoRequestFailed && ( |
149 | <div> | 147 | <Fragment> |
150 | {!isLoading && ( | 148 | {!isLoading && ( |
151 | <div className="account"> | 149 | <div className="account"> |
152 | <div className="account__box account__box--flex"> | 150 | <div className="account__box account__box--flex"> |
@@ -194,7 +192,7 @@ export default @observer class AccountDashboard extends Component { | |||
194 | ) : ( | 192 | ) : ( |
195 | <div className="account franz-form"> | 193 | <div className="account franz-form"> |
196 | {orders.length > 0 && ( | 194 | {orders.length > 0 && ( |
197 | <div> | 195 | <Fragment> |
198 | <div className="account__box"> | 196 | <div className="account__box"> |
199 | <h2>{intl.formatMessage(messages.headlineSubscription)}</h2> | 197 | <h2>{intl.formatMessage(messages.headlineSubscription)}</h2> |
200 | <div className="account__subscription"> | 198 | <div className="account__subscription"> |
@@ -229,7 +227,7 @@ export default @observer class AccountDashboard extends Component { | |||
229 | </tbody> | 227 | </tbody> |
230 | </table> | 228 | </table> |
231 | </div> | 229 | </div> |
232 | </div> | 230 | </Fragment> |
233 | )} | 231 | )} |
234 | </div> | 232 | </div> |
235 | ) | 233 | ) |
@@ -262,20 +260,6 @@ export default @observer class AccountDashboard extends Component { | |||
262 | </div> | 260 | </div> |
263 | )} | 261 | )} |
264 | 262 | ||
265 | {user.isMiner && ( | ||
266 | <div className="account franz-form"> | ||
267 | <div className="account__box account__box"> | ||
268 | <h2>Miner Info</h2> | ||
269 | <div className="account__subscription"> | ||
270 | <div> | ||
271 | <p>To maintain a high security level for all our Franz users, we had to remove the miner. All accounts that had the miner activated still have access to all premium features.</p> | ||
272 | <p>Every financial support is still much appreciated.</p> | ||
273 | </div> | ||
274 | </div> | ||
275 | </div> | ||
276 | </div> | ||
277 | )} | ||
278 | |||
279 | {!user.isEnterprise && !user.isPremium && ( | 263 | {!user.isEnterprise && !user.isPremium && ( |
280 | isLoadingPlans ? ( | 264 | isLoadingPlans ? ( |
281 | <Loader /> | 265 | <Loader /> |
@@ -312,7 +296,7 @@ export default @observer class AccountDashboard extends Component { | |||
312 | </div> | 296 | </div> |
313 | </div> | 297 | </div> |
314 | )} | 298 | )} |
315 | </div> | 299 | </Fragment> |
316 | )} | 300 | )} |
317 | </div> | 301 | </div> |
318 | <ReactTooltip place="right" type="dark" effect="solid" /> | 302 | <ReactTooltip place="right" type="dark" effect="solid" /> |