logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

column_settings_container.js (526B)


  1. import { connect } from 'react-redux';
  2. import ColumnSettings from '../components/column_settings';
  3. import { changeSetting, saveSettings } from '../../../actions/settings';
  4. const mapStateToProps = state => ({
  5. settings: state.getIn(['settings', 'home']),
  6. });
  7. const mapDispatchToProps = dispatch => ({
  8. onChange (key, checked) {
  9. dispatch(changeSetting(['home', ...key], checked));
  10. },
  11. onSave () {
  12. dispatch(saveSettings());
  13. },
  14. });
  15. export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);