diff options
| -rw-r--r-- | app/components/Settings.js | 15 | ||||
| -rw-r--r-- | app/containers/SettingsPage.js | 7 |
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 }; }; |
