aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/AccountScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-04-08 15:32:16 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-04-08 15:32:16 +0200
commit229c6017efbd0198747cba6e8997dc8ce4f9a7d4 (patch)
tree6718efa3381f7e82d7ff7754109bd7fa9b899a4f /src/containers/settings/AccountScreen.js
parentReplace invoices & subscription info with links to website (diff)
downloadferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.tar.gz
ferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.tar.zst
ferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.zip
Clean up
Diffstat (limited to 'src/containers/settings/AccountScreen.js')
-rw-r--r--src/containers/settings/AccountScreen.js36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js
index 0c837fab9..4ac7328c6 100644
--- a/src/containers/settings/AccountScreen.js
+++ b/src/containers/settings/AccountScreen.js
@@ -1,4 +1,3 @@
1import { remote } from 'electron';
2import React, { Component } from 'react'; 1import React, { Component } from 'react';
3import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
4import { inject, observer } from 'mobx-react'; 3import { inject, observer } from 'mobx-react';
@@ -11,8 +10,6 @@ import AccountDashboard from '../../components/settings/account/AccountDashboard
11import ErrorBoundary from '../../components/util/ErrorBoundary'; 10import ErrorBoundary from '../../components/util/ErrorBoundary';
12import { WEBSITE } from '../../environment'; 11import { WEBSITE } from '../../environment';
13 12
14const { BrowserWindow } = remote;
15
16export default @inject('stores', 'actions') @observer class AccountScreen extends Component { 13export default @inject('stores', 'actions') @observer class AccountScreen extends Component {
17 componentWillMount() { 14 componentWillMount() {
18 const { 15 const {
@@ -23,7 +20,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
23 } 20 }
24 21
25 onCloseWindow() { 22 onCloseWindow() {
26 const { user, payment } = this.props.stores; 23 const { user } = this.props.stores;
27 user.getUserInfoRequest.invalidate({ immediately: true }); 24 user.getUserInfoRequest.invalidate({ immediately: true });
28 } 25 }
29 26
@@ -34,36 +31,6 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
34 payment.plansRequest.reload(); 31 payment.plansRequest.reload();
35 } 32 }
36 33
37 async handlePaymentDashboard() {
38 const { actions, stores } = this.props;
39
40 // actions.payment.createDashboardUrl();
41
42 // const dashboard = await stores.payment.createDashboardUrlRequest;
43
44 // if (dashboard.url) {
45 // const paymentWindow = new BrowserWindow({
46 // title: '🔒 Franz Subscription Dashboard',
47 // parent: remote.getCurrentWindow(),
48 // modal: false,
49 // width: 900,
50 // minWidth: 600,
51 // webPreferences: {
52 // nodeIntegration: false,
53 // },
54 // });
55 // paymentWindow.loadURL(dashboard.url);
56
57 // paymentWindow.on('closed', () => {
58 // this.onCloseWindow();
59 // });
60 // }
61
62 const url = `${WEBSITE}/user/billing?token=${stores.user.authToken}&utm_source=app&utm_medium=edit_profile`;
63
64 actions.app.openExternalUrl({ url });
65 }
66
67 handleWebsiteLink(route) { 34 handleWebsiteLink(route) {
68 const { actions, stores } = this.props; 35 const { actions, stores } = this.props;
69 36
@@ -84,7 +51,6 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
84 <ErrorBoundary> 51 <ErrorBoundary>
85 <AccountDashboard 52 <AccountDashboard
86 user={user.data} 53 user={user.data}
87 orders={payment.orders} // das muss raus
88 isLoading={isLoadingUserInfo} 54 isLoading={isLoadingUserInfo}
89 isLoadingPlans={isLoadingPlans} 55 isLoadingPlans={isLoadingPlans}
90 userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError} 56 userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError}