diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-06-15 12:42:09 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-06-28 09:00:49 +0200 |
| commit | ddcc5faae92a1d4f0f8fd42364fc5b6245057f7a (patch) | |
| tree | a8c13d6c52c5389abe2dcf636d94c3ee218fbce3 /gui/src/renderer/containers | |
| parent | 7a2593e312083c7bb7ef71982307dea8e62e41cc (diff) | |
| download | mullvadvpn-ddcc5faae92a1d4f0f8fd42364fc5b6245057f7a.tar.xz mullvadvpn-ddcc5faae92a1d4f0f8fd42364fc5b6245057f7a.zip | |
Implement new new account flow
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx b/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx index 46890cb169..4d3d8c1271 100644 --- a/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx +++ b/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx @@ -1,4 +1,5 @@ import { connect } from 'react-redux'; +import { RouteComponentProps, withRouter } from 'react-router'; import { bindActionCreators } from 'redux'; import log from '../../shared/logging'; import ExpiredAccountErrorView from '../components/ExpiredAccountErrorView'; @@ -15,7 +16,7 @@ const mapStateToProps = (state: IReduxState) => ({ isBlocked: state.connection.isBlocked, blockWhenDisconnected: state.settings.blockWhenDisconnected, }); -const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext) => { +const mapDispatchToProps = (dispatch: ReduxDispatch, props: RouteComponentProps & IAppContext) => { const account = bindActionCreators(accountActions, dispatch); return { // Changes login method from "new_account" to "existing_account" @@ -35,9 +36,12 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext) => { log.error('Failed to update block when disconnected', e.message); } }, + navigateToRedeemVoucher: () => { + props.history.push('/main/voucher/redeem'); + }, }; }; export default withAppContext( - connect(mapStateToProps, mapDispatchToProps)(ExpiredAccountErrorView), + withRouter(connect(mapStateToProps, mapDispatchToProps)(ExpiredAccountErrorView)), ); |
