mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
Renaming to commentClassNames
This commit is contained in:
@@ -9,11 +9,11 @@ export default class OffTopicFilter extends React.Component {
|
||||
|
||||
handleChange = (e) => {
|
||||
if (e.target.checked) {
|
||||
this.props.addClassName(this.cn);
|
||||
this.props.addCommentClassName(this.cn);
|
||||
this.props.toggleCheckbox();
|
||||
} else {
|
||||
const idx = this.props.classNames.findIndex((i) => i[this.className]);
|
||||
this.props.removeClassName(idx);
|
||||
const idx = this.props.commentClassNames.findIndex((i) => i[this.className]);
|
||||
this.props.removeCommentClassName(idx);
|
||||
this.props.toggleCheckbox();
|
||||
}
|
||||
this.props.closeViewingOptions();
|
||||
|
||||
@@ -2,24 +2,24 @@ import {connect} from 'react-redux';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {toggleCheckbox} from '../actions';
|
||||
import {
|
||||
addClassName,
|
||||
removeClassName
|
||||
addCommentClassName,
|
||||
removeCommentClassName
|
||||
} from 'coral-embed-stream/src/actions/comment';
|
||||
import OffTopicFilter from '../components/OffTopicFilter';
|
||||
import {closeViewingOptions} from 'coral-embed-stream/src/actions/stream';
|
||||
|
||||
const mapStateToProps = ({comment, offTopic}) => ({
|
||||
classNames: comment.classNames,
|
||||
commentClassNames: comment.commentClassNames,
|
||||
checked: offTopic.checked
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) =>
|
||||
bindActionCreators(
|
||||
{
|
||||
addClassName,
|
||||
removeClassName,
|
||||
toggleCheckbox,
|
||||
closeViewingOptions
|
||||
closeViewingOptions,
|
||||
addCommentClassName,
|
||||
removeCommentClassName
|
||||
},
|
||||
dispatch
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user