summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-03-01 13:16:33 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-03-01 13:16:33 +0000
commit574e1b6fd7db510eafe0610d85e17160a6947c09 (patch)
tree5444f167c0790897176c0975f31edb2361c0c8ce /app
parentfa52fcb8a26e61f1674479332dabae3846ce32b6 (diff)
downloadmullvadvpn-574e1b6fd7db510eafe0610d85e17160a6947c09.tar.xz
mullvadvpn-574e1b6fd7db510eafe0610d85e17160a6947c09.zip
Rename callbacks
Diffstat (limited to 'app')
-rw-r--r--app/components/Settings.js15
-rw-r--r--app/containers/SettingsPage.js7
2 files changed, 12 insertions, 10 deletions
diff --git a/app/components/Settings.js b/app/components/Settings.js
index b0262e0e60..7befc421a0 100644
--- a/app/components/Settings.js
+++ b/app/components/Settings.js
@@ -7,25 +7,26 @@ import { formatAccount } from '../lib/formatters';
export default class Settings extends Component {
static propTypes = {
- logout: PropTypes.func.isRequired,
- openExternalLink: PropTypes.func.isRequired,
- updateSettings: PropTypes.func.isRequired
+ onLogout: PropTypes.func.isRequired,
+ onClose: PropTypes.func.isRequired,
+ onExternalLink: PropTypes.func.isRequired,
+ onUpdateSettings: PropTypes.func.isRequired
}
onClose() {
- this.props.router.push('/connect');
+ this.props.onClose();
}
onAutoSecure(isOn) {
- this.props.updateSettings({ autoSecure: isOn });
+ this.props.onUpdateSettings({ autoSecure: isOn });
}
onExternalLink(type) {
- this.props.openExternalLink(type);
+ this.props.onExternalLink(type);
}
onLogout() {
- this.props.logout();
+ this.props.onLogout();
}
render() {
diff --git a/app/containers/SettingsPage.js b/app/containers/SettingsPage.js
index 63b1e54b0a..345d073d40 100644
--- a/app/containers/SettingsPage.js
+++ b/app/containers/SettingsPage.js
@@ -14,9 +14,10 @@ const mapDispatchToProps = (dispatch, props) => {
const { logout } = bindActionCreators(userActions, dispatch);
const { updateSettings } = bindActionCreators(settingsActions, dispatch);
return {
- logout: () => logout(props.backend),
- openExternalLink: (type) => shell.openExternal(links[type]),
- updateSettings
+ onLogout: () => logout(props.backend),
+ onClose: () => props.router.push('/connect'),
+ onExternalLink: (type) => shell.openExternal(links[type]),
+ onUpdateSettings: updateSettings
};
};