diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-05 17:06:47 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-06-12 15:58:20 +0200 |
| commit | 70cf899e378875970050b4fd84ffe7e4973d8dc3 (patch) | |
| tree | d050755f406dc1d537095c71e7b507780e492548 /app/containers | |
| parent | ab6dc0a7af2bde75bf361c185f48ba38c05cc564 (diff) | |
| download | mullvadvpn-70cf899e378875970050b4fd84ffe7e4973d8dc3.tar.xz mullvadvpn-70cf899e378875970050b4fd84ffe7e4973d8dc3.zip | |
Update account expiry when showing the account details
Diffstat (limited to 'app/containers')
| -rw-r--r-- | app/containers/AccountPage.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/containers/AccountPage.js b/app/containers/AccountPage.js index 210ad4aaeb..1c54167b50 100644 --- a/app/containers/AccountPage.js +++ b/app/containers/AccountPage.js @@ -11,13 +11,19 @@ import { openLink } from '../lib/platform'; import type { ReduxState, ReduxDispatch } from '../redux/store'; import type { SharedRouteProps } from '../routes'; -const mapStateToProps = (state: ReduxState) => state; +const mapStateToProps = (state: ReduxState) => ({ + accountToken: state.account.accountToken, + accountExpiry: state.account.expiry, +}); const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) => { + const { backend } = props; const { push: pushHistory } = bindActionCreators({ push }, dispatch); const { logout } = bindActionCreators(accountActions, dispatch); + return { + updateAccountExpiry: () => backend.updateAccountExpiry(), onLogout: () => { - logout(props.backend); + logout(backend); }, onClose: () => { pushHistory('/settings'); |
