diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-11-26 14:19:08 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-14 13:58:44 +0100 |
| commit | ebfdf9289aff8d85266161b17f490bc0a661ffcf (patch) | |
| tree | 07cd905c535564dfc3b35a63856ec21359aad658 /gui/src/renderer/containers | |
| parent | 9916f3444c1d15a6d9ad5caba3555e1c0e1a704c (diff) | |
| download | mullvadvpn-ebfdf9289aff8d85266161b17f490bc0a661ffcf.tar.xz mullvadvpn-ebfdf9289aff8d85266161b17f490bc0a661ffcf.zip | |
Add log out confirmation dialog
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/AccountPage.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gui/src/renderer/containers/AccountPage.tsx b/gui/src/renderer/containers/AccountPage.tsx index a5251500d0..2309c614fb 100644 --- a/gui/src/renderer/containers/AccountPage.tsx +++ b/gui/src/renderer/containers/AccountPage.tsx @@ -1,10 +1,12 @@ import { connect } from 'react-redux'; +import { bindActionCreators } from 'redux'; import { links } from '../../config.json'; import Account from '../components/Account'; import withAppContext, { IAppContext } from '../context'; import { IHistoryProps, withHistory } from '../lib/history'; import { IReduxState, ReduxDispatch } from '../redux/store'; +import accountActions from '../redux/account/actions'; const mapStateToProps = (state: IReduxState) => ({ deviceName: state.account.deviceName, @@ -13,8 +15,12 @@ const mapStateToProps = (state: IReduxState) => ({ expiryLocale: state.userInterface.locale, isOffline: state.connection.isBlocked, }); -const mapDispatchToProps = (_dispatch: ReduxDispatch, props: IHistoryProps & IAppContext) => { +const mapDispatchToProps = (dispatch: ReduxDispatch, props: IHistoryProps & IAppContext) => { + const account = bindActionCreators(accountActions, dispatch); + return { + prepareLogout: () => account.prepareLogout(), + cancelLogout: () => account.cancelLogout(), onLogout: () => { void props.app.logout(); }, @@ -23,6 +29,7 @@ const mapDispatchToProps = (_dispatch: ReduxDispatch, props: IHistoryProps & IAp }, onBuyMore: () => props.app.openLinkWithAuth(links.purchase), updateAccountData: () => props.app.updateAccountData(), + getDevice: () => props.app.getDevice(), }; }; |
