mastodon/app/assets/javascripts/components/features/notifications/containers/column_settings_container.jsx

18 lines
487 B
JavaScript

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