summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/containers
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-02-19 19:31:35 +0100
committerOskar Nyberg <oskar@mullvad.net>2020-02-21 14:18:21 +0100
commit6ad3b7b22e21288e4fa6bea6342f8a63e18552ee (patch)
treed1be7c8a127d02ab724df7b9b6a4eb8b4ec356e4 /gui/src/renderer/containers
parent7081c2ffc2c2d228131588cf83d023a78a647c3a (diff)
downloadmullvadvpn-6ad3b7b22e21288e4fa6bea6342f8a63e18552ee.tar.xz
mullvadvpn-6ad3b7b22e21288e4fa6bea6342f8a63e18552ee.zip
Fix linter problems caused by @typescript-eslint/no-floating-promises
Diffstat (limited to 'gui/src/renderer/containers')
-rw-r--r--gui/src/renderer/containers/AccountPage.tsx3
-rw-r--r--gui/src/renderer/containers/LoginPage.tsx3
-rw-r--r--gui/src/renderer/containers/PreferencesPage.tsx3
3 files changed, 6 insertions, 3 deletions
diff --git a/gui/src/renderer/containers/AccountPage.tsx b/gui/src/renderer/containers/AccountPage.tsx
index 945512a2f7..012427b94d 100644
--- a/gui/src/renderer/containers/AccountPage.tsx
+++ b/gui/src/renderer/containers/AccountPage.tsx
@@ -2,6 +2,7 @@ import { goBack } from 'connected-react-router';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { links } from '../../config.json';
+import consumePromise from '../../shared/promise';
import Account from '../components/Account';
import withAppContext, { IAppContext } from '../context';
@@ -17,7 +18,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext) => {
const history = bindActionCreators({ goBack }, dispatch);
return {
onLogout: () => {
- props.app.logout();
+ consumePromise(props.app.logout());
},
onClose: () => {
history.goBack();
diff --git a/gui/src/renderer/containers/LoginPage.tsx b/gui/src/renderer/containers/LoginPage.tsx
index 9b39520881..2f221ad875 100644
--- a/gui/src/renderer/containers/LoginPage.tsx
+++ b/gui/src/renderer/containers/LoginPage.tsx
@@ -2,6 +2,7 @@ import { push } from 'connected-react-router';
import { shell } from 'electron';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
+import consumePromise from '../../shared/promise';
import Login from '../components/Login';
import withAppContext, { IAppContext } from '../context';
import accountActions from '../redux/account/actions';
@@ -24,7 +25,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext) => {
history.push('/settings');
},
login: (account: string) => {
- props.app.login(account);
+ consumePromise(props.app.login(account));
},
resetLoginError: () => {
resetLoginError();
diff --git a/gui/src/renderer/containers/PreferencesPage.tsx b/gui/src/renderer/containers/PreferencesPage.tsx
index 068f6f8d1d..299d5799cb 100644
--- a/gui/src/renderer/containers/PreferencesPage.tsx
+++ b/gui/src/renderer/containers/PreferencesPage.tsx
@@ -2,6 +2,7 @@ import { goBack } from 'connected-react-router';
import log from 'electron-log';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
+import consumePromise from '../../shared/promise';
import Preferences from '../components/Preferences';
import withAppContext, { IAppContext } from '../context';
import { IReduxState, ReduxDispatch } from '../redux/store';
@@ -35,7 +36,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext) => {
props.app.setAutoConnect(autoConnect);
},
setAllowLan: (allowLan: boolean) => {
- props.app.setAllowLan(allowLan);
+ consumePromise(props.app.setAllowLan(allowLan));
},
setStartMinimized: (startMinimized: boolean) => {
props.app.setStartMinimized(startMinimized);