diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-12-28 15:39:19 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-01-03 12:14:42 +0100 |
| commit | 3113a85692d758a999d8ebb99ecefc6d014ba817 (patch) | |
| tree | 9a64ad015001af8d53590d21d6470324e181ab4e /app/containers | |
| parent | 7c8b368e0099d86bb96412b89c4b7c3cf35c4537 (diff) | |
| download | mullvadvpn-3113a85692d758a999d8ebb99ecefc6d014ba817.tar.xz mullvadvpn-3113a85692d758a999d8ebb99ecefc6d014ba817.zip | |
Convert preferences to ReactXP
Diffstat (limited to 'app/containers')
| -rw-r--r-- | app/containers/PreferencesPage.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/containers/PreferencesPage.js b/app/containers/PreferencesPage.js index b6bc60350d..793848d35b 100644 --- a/app/containers/PreferencesPage.js +++ b/app/containers/PreferencesPage.js @@ -8,13 +8,16 @@ import Preferences from '../components/Preferences'; import type { ReduxState, ReduxDispatch } from '../redux/store'; import type { SharedRouteProps } from '../routes'; -const mapStateToProps = (state: ReduxState) => state; +const mapStateToProps = (state: ReduxState) => ({ + allowLan: state.settings.allowLan +}); + const mapDispatchToProps = (dispatch: ReduxDispatch, props: SharedRouteProps) => { const { backend } = props; const { push: pushHistory } = bindActionCreators({ push }, dispatch); return { onClose: () => pushHistory('/settings'), - onChangeLanSharing: (allowLan) => { + onChangeAllowLan: (allowLan) => { backend.setAllowLan(allowLan); }, }; |
