pleroma/app/gabsocial/features/home_timeline/containers/column_settings_container.js

22 lines
524 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
import { changeSetting, saveSettings } from '../../../actions/settings';
const mapStateToProps = state => ({
settings: state.getIn(['settings', 'home']),
});
const mapDispatchToProps = dispatch => ({
onChange(key, checked) {
2020-03-27 13:59:38 -07:00
dispatch(changeSetting(['home', ...key], checked));
},
onSave() {
2020-03-27 13:59:38 -07:00
dispatch(saveSettings());
},
});
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);