diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-06-15 20:11:24 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-06-24 11:23:07 +0200 |
| commit | 1f54942ca8da86efeb64b174dcceecdd9e48a85c (patch) | |
| tree | f1187dd93e4e6cb1f6ee1c91e87e101a7031694b /gui/src/renderer/containers | |
| parent | 63193938c1c5719e06eae51f8d213af55125a2de (diff) | |
| download | mullvadvpn-1f54942ca8da86efeb64b174dcceecdd9e48a85c.tar.xz mullvadvpn-1f54942ca8da86efeb64b174dcceecdd9e48a85c.zip | |
Refactor AccountExpiry
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/ConnectPage.tsx | 5 | ||||
| -rw-r--r-- | gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/gui/src/renderer/containers/ConnectPage.tsx b/gui/src/renderer/containers/ConnectPage.tsx index 4ba47f7511..57f550d988 100644 --- a/gui/src/renderer/containers/ConnectPage.tsx +++ b/gui/src/renderer/containers/ConnectPage.tsx @@ -3,7 +3,6 @@ import log from 'electron-log'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { sprintf } from 'sprintf-js'; -import AccountExpiry from '../../shared/account-expiry'; import { messages } from '../../shared/gettext'; import Connect from '../components/Connect'; import withAppContext, { IAppContext } from '../context'; @@ -65,9 +64,7 @@ function getRelayName( const mapStateToProps = (state: IReduxState) => { return { - accountExpiry: state.account.expiry - ? new AccountExpiry(state.account.expiry, state.userInterface.locale) - : undefined, + accountExpiry: state.account.expiry, loginState: state.account.status, blockWhenDisconnected: state.settings.blockWhenDisconnected, selectedRelayName: getRelayName(state.settings.relaySettings, state.settings.relayLocations), diff --git a/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx b/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx index 2c4ca2e6dd..dcdc862355 100644 --- a/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx +++ b/gui/src/renderer/containers/ExpiredAccountErrorViewContainer.tsx @@ -1,7 +1,6 @@ import log from 'electron-log'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import AccountExpiry from '../../shared/account-expiry'; import ExpiredAccountErrorView from '../components/ExpiredAccountErrorView'; import accountActions from '../redux/account/actions'; @@ -10,9 +9,7 @@ import { IReduxState, ReduxDispatch } from '../redux/store'; const mapStateToProps = (state: IReduxState) => ({ accountToken: state.account.accountToken, - accountExpiry: state.account.expiry - ? new AccountExpiry(state.account.expiry, state.userInterface.locale) - : undefined, + accountExpiry: state.account.expiry, loginState: state.account.status, isBlocked: state.connection.isBlocked, blockWhenDisconnected: state.settings.blockWhenDisconnected, |
