diff --git a/client/coral-embed-stream/src/components/ViewingOptions.js b/client/coral-embed-stream/src/components/ViewingOptions.js
index 05f8afd2e..8477a78ea 100644
--- a/client/coral-embed-stream/src/components/ViewingOptions.js
+++ b/client/coral-embed-stream/src/components/ViewingOptions.js
@@ -24,7 +24,7 @@ export default class ViewingOptions extends React.Component {
Viewing Options
{
- true ? (
+ this.state.open ? (
{
diff --git a/client/coral-embed-stream/src/reducers/comment.js b/client/coral-embed-stream/src/reducers/comment.js
index 2f38cfce2..e2cd43ee4 100644
--- a/client/coral-embed-stream/src/reducers/comment.js
+++ b/client/coral-embed-stream/src/reducers/comment.js
@@ -1,11 +1,7 @@
import {ADD_CLASSNAME, REMOVE_CLASSNAME} from '../constants/comment';
const initialState = {
- classNames: [{
- 'wapoOff' : {
- tags: ['OFF_TOPIC']
- }
- }]
+ classNames: []
};
export default function comment (state = initialState, action) {
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css
index b24619c57..a8b7f9c61 100644
--- a/client/coral-embed-stream/style/default.css
+++ b/client/coral-embed-stream/style/default.css
@@ -494,3 +494,7 @@ button.comment__action-button[disabled],
visibility: visible;
}
}
+
+.offTopicComment {
+ display: none;
+}
diff --git a/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js b/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
index 856bfef3c..a73bcc183 100644
--- a/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
+++ b/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
@@ -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);
}
}