Renaming to commentClassNames

This commit is contained in:
Belen Curcio
2017-06-07 09:28:12 -03:00
parent b5c9e92cc6
commit e24f6ca9f1
8 changed files with 29 additions and 29 deletions
@@ -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
);