({
assetUrl: state.stream.assetUrl,
activeTab: state.embed.activeTab,
previousTab: state.embed.previousTab,
+ classNames: state.comment.classNames
});
const mapDispatchToProps = (dispatch) =>
diff --git a/client/coral-framework/helpers/plugins.js b/client/coral-framework/helpers/plugins.js
index 02ee8c3a7..3e54ee5fa 100644
--- a/client/coral-framework/helpers/plugins.js
+++ b/client/coral-framework/helpers/plugins.js
@@ -8,6 +8,7 @@ import plugins from 'pluginsConfig';
import {getDefinitionName, mergeDocuments} from 'coral-framework/utils';
import {loadTranslations} from 'coral-framework/services/i18n';
+console.log(plugins)
export const pluginReducers = merge(
...plugins
.filter((o) => o.module.reducer)
diff --git a/client/coral-framework/reducers/index.js b/client/coral-framework/reducers/index.js
index d5b66bbae..a25daee5c 100644
--- a/client/coral-framework/reducers/index.js
+++ b/client/coral-framework/reducers/index.js
@@ -3,7 +3,7 @@ import user from './user';
import asset from './asset';
import {reducer as commentBox} from '../../coral-plugin-commentbox';
import {pluginReducers} from '../helpers/plugins';
-
+console.log(pluginReducers)
export default {
auth,
user,
diff --git a/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js b/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
index e91320b4b..f8c588316 100644
--- a/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
+++ b/plugins/coral-plugin-offtopic/client/components/OffTopicFilter.js
@@ -18,14 +18,14 @@ class OffTopicFilter extends React.Component {
const idx = this.props.comment.classNames.indexOf(this.cn);
this.props.removeClassName(idx);
}
- props.closeViewingOptions();
+ this.props.closeViewingOptions();
}
render() {
return (
@@ -33,7 +33,7 @@ class OffTopicFilter extends React.Component {
}
}
-const mapStateToProps = ({comment}) => ({comment});
+const mapStateToProps = ({comment, offTopicFilter}) => ({comment, offTopicFilter});
const mapDispatchToProps = (dispatch) =>
bindActionCreators({addClassName, removeClassName, closeViewingOptions}, dispatch);
diff --git a/plugins/coral-plugin-offtopic/client/index.js b/plugins/coral-plugin-offtopic/client/index.js
index cd591de28..b6f9a7f5b 100644
--- a/plugins/coral-plugin-offtopic/client/index.js
+++ b/plugins/coral-plugin-offtopic/client/index.js
@@ -2,9 +2,11 @@ import OffTopicCheckbox from './components/OffTopicCheckbox';
import OffTopicTag from './components/OffTopicTag';
import OffTopicFilter from './components/OffTopicFilter';
import translations from './translations.json';
+import reducer from './reducer';
export default {
translations,
+ reducer,
slots: {
commentInputDetailArea: [OffTopicCheckbox],
streamViewingOptions: [OffTopicFilter],
diff --git a/plugins/coral-plugin-offtopic/client/reducer.js b/plugins/coral-plugin-offtopic/client/reducer.js
new file mode 100644
index 000000000..f5673b1a9
--- /dev/null
+++ b/plugins/coral-plugin-offtopic/client/reducer.js
@@ -0,0 +1,10 @@
+const initialState = {
+ filter: true
+};
+
+export default function offTopic (state = initialState, action) {
+ switch (action.type) {
+ default :
+ return state;
+ }
+}