mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
Fully working, needs docs
This commit is contained in:
@@ -7,15 +7,14 @@ import {addClassName, removeClassName} from 'coral-embed-stream/src/actions/comm
|
||||
class OffTopicFilter extends React.Component {
|
||||
|
||||
tag = 'OFF_TOPIC';
|
||||
className = 'wapoOfftopic';
|
||||
className = 'offTopicComment';
|
||||
cn = {[this.className] : {tags: [this.tag]}};
|
||||
|
||||
handleChange = (e) => {
|
||||
if (e.target.checked) {
|
||||
this.props.addClassName({
|
||||
[this.className] : {tags: [this.tag]}
|
||||
});
|
||||
this.props.addClassName(this.cn);
|
||||
} else {
|
||||
const idx = this.props.comment.classNames.indexOf(this.className);
|
||||
const idx = this.props.comment.classNames.indexOf(this.cn);
|
||||
this.props.removeClassName(idx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user