summaryrefslogtreecommitdiffhomepage
path: root/app/components
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-08-23 14:32:46 +0200
committerErik Larkö <erik@mullvad.net>2017-08-23 14:32:46 +0200
commitadc86a0de57367d0243a4f7dc08c87840f421b39 (patch)
treecd915fda580ccc7647f25f725983c0ee54deb4f7 /app/components
parentfb1f92d111cd752a6b9edafc8dff58d5b8a59042 (diff)
parentccd5dda6f107ff57078ac6d080d65637bd3ccf79 (diff)
downloadmullvadvpn-adc86a0de57367d0243a4f7dc08c87840f421b39.tar.xz
mullvadvpn-adc86a0de57367d0243a4f7dc08c87840f421b39.zip
Merge branch 'connect-tests-1'
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Connect.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js
index 064873f581..c67e72f696 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -10,14 +10,12 @@ import Map from './Map';
import type { ServerInfo } from '../lib/backend';
import type { HeaderBarStyle } from './HeaderBar';
-import type { AccountReduxState } from '../redux/account/reducers';
import type { ConnectionReduxState } from '../redux/connection/reducers';
-import type { SettingsReduxState } from '../redux/settings/reducers';
export type ConnectProps = {
- account: AccountReduxState,
+ accountPaidUntil: string,
connection: ConnectionReduxState,
- settings: SettingsReduxState,
+ preferredServer: string,
onSettings: () => void,
onSelectLocation: () => void,
onConnect: (address: string) => void,
@@ -96,7 +94,7 @@ export default class Connect extends Component {
}
renderMap(): React.Element<*> {
- const preferredServer = this.props.settings.preferredServer;
+ const preferredServer = this.props.preferredServer;
const serverInfo = this.props.getServerInfo(preferredServer);
if(!serverInfo) {
throw new Error('Server info cannot be null.');
@@ -296,7 +294,7 @@ export default class Connect extends Component {
// Handlers
onConnect() {
- const { preferredServer } = this.props.settings;
+ const preferredServer = this.props.preferredServer;
const serverInfo = this.props.getServerInfo(preferredServer);
if(serverInfo) {
this.props.onConnect(serverInfo.address);
@@ -369,7 +367,7 @@ export default class Connect extends Component {
}
// No credit?
- const { paidUntil } = this.props.account;
+ const paidUntil = this.props.accountPaidUntil;
if(paidUntil && moment(paidUntil).isSameOrBefore(moment())) {
return new BackendError('NO_CREDIT');
}