summaryrefslogtreecommitdiffhomepage
path: root/app/containers
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-08-01 14:21:58 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-08-08 15:26:34 +0200
commit2f6e76531419c0653212410dc992bf952ee5fbe5 (patch)
tree43e2eae17b1ae61da6a05a2e333b88cc6060b2ee /app/containers
parent21c62239a0ef590e77f3a5a3448f36259755d6d8 (diff)
downloadmullvadvpn-2f6e76531419c0653212410dc992bf952ee5fbe5.tar.xz
mullvadvpn-2f6e76531419c0653212410dc992bf952ee5fbe5.zip
Pull account expiry on demand
Diffstat (limited to 'app/containers')
-rw-r--r--app/containers/ConnectPage.js1
-rw-r--r--app/containers/SettingsPage.js9
2 files changed, 6 insertions, 4 deletions
diff --git a/app/containers/ConnectPage.js b/app/containers/ConnectPage.js
index 6f906f1c82..d1d11af334 100644
--- a/app/containers/ConnectPage.js
+++ b/app/containers/ConnectPage.js
@@ -83,6 +83,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) =>
}
},
onExternalLink: (type) => openLink(links[type]),
+ updateAccountExpiry: () => props.app.updateAccountExpiry(),
};
};
diff --git a/app/containers/SettingsPage.js b/app/containers/SettingsPage.js
index 8ffd0691fd..f0e8d7c53b 100644
--- a/app/containers/SettingsPage.js
+++ b/app/containers/SettingsPage.js
@@ -11,11 +11,11 @@ import type { ReduxState, ReduxDispatch } from '../redux/store';
import type { SharedRouteProps } from '../routes';
const mapStateToProps = (state: ReduxState) => ({
- account: state.account,
- settings: state.settings,
- version: getAppVersion(),
+ loginState: state.account.status,
+ accountExpiry: state.account.expiry,
+ appVersion: getAppVersion(),
});
-const mapDispatchToProps = (dispatch: ReduxDispatch, _props: SharedRouteProps) => {
+const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) => {
const { push: pushHistory } = bindActionCreators({ push }, dispatch);
return {
onQuit: () => exit(),
@@ -25,6 +25,7 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, _props: SharedRouteProps) =
onViewPreferences: () => pushHistory('/settings/preferences'),
onViewAdvancedSettings: () => pushHistory('/settings/advanced'),
onExternalLink: (type) => openLink(links[type]),
+ updateAccountExpiry: () => props.app.updateAccountExpiry(),
};
};