bigbuffet-rw/app/soapbox/features/community_timeline/containers/column_settings_container.js

18 lines
501 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 { getSettings, changeSetting } from '../../../actions/settings';
2020-03-27 13:59:38 -07:00
const mapStateToProps = state => ({
settings: getSettings(state).get('community'),
2020-03-27 13:59:38 -07:00
});
const mapDispatchToProps = (dispatch) => {
return {
onChange(key, checked) {
2020-03-27 13:59:38 -07:00
dispatch(changeSetting(['community', ...key], checked));
},
};
};
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);