summaryrefslogtreecommitdiffhomepage
path: root/app/containers
diff options
context:
space:
mode:
Diffstat (limited to 'app/containers')
-rw-r--r--app/containers/PreferencesPage.js7
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);
},
};