pleroma/app/gabsocial/features/community_timeline/containers/column_settings_container.js
Alex Gleason a60c47bb19
Don't persist default settings
Only persist settings if they've been overridden by the user
2020-04-28 13:49:39 -05:00

17 lines
501 B
JavaScript

import { connect } from 'react-redux';
import ColumnSettings from '../components/column_settings';
import { getSettings, changeSetting } from '../../../actions/settings';
const mapStateToProps = state => ({
settings: getSettings(state).get('community'),
});
const mapDispatchToProps = (dispatch) => {
return {
onChange(key, checked) {
dispatch(changeSetting(['community', ...key], checked));
},
};
};
export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);