This repository has been archived on 2023-07-01. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/javascript/flavours/glitch/features/home_timeline/containers/column_settings_container.js

22 lines
533 B
JavaScript
Raw Normal View History

2017-01-10 17:25:10 +01:00
import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
2017-12-04 08:26:40 +01:00
import { changeSetting, saveSettings } from 'flavours/glitch/actions/settings';
2017-01-10 17:25:10 +01:00
const mapStateToProps = state => ({
settings: state.getIn(['settings', 'home']),
2017-01-10 17:25:10 +01:00
});
const mapDispatchToProps = dispatch => ({
onChange (key, checked) {
dispatch(changeSetting(['home', ...key], checked));
},
onSave () {
dispatch(saveSettings());
},
2017-01-10 17:25:10 +01:00
});
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);