+ );
+};
+
+FeaturedDialog.propTypes = {
+ showFeaturedDialog: PropTypes.bool.isRequired,
+ closeFeaturedDialog: PropTypes.func.isRequired,
+};
+
+export default FeaturedDialog;
diff --git a/plugins/talk-plugin-featured-comments/client/components/ModTag.js b/plugins/talk-plugin-featured-comments/client/components/ModTag.js
index 0664f07cd..70f51dcbc 100644
--- a/plugins/talk-plugin-featured-comments/client/components/ModTag.js
+++ b/plugins/talk-plugin-featured-comments/client/components/ModTag.js
@@ -1,9 +1,9 @@
import React from 'react';
+import PropTypes from 'prop-types';
import cn from 'classnames';
import styles from './ModTag.css';
import {t} from 'plugin-api/beta/client/services';
import {Icon} from 'plugin-api/beta/client/components/ui';
-import {getErrorMessages} from 'plugin-api/beta/client/utils';
export default class ModTag extends React.Component {
constructor() {
@@ -29,17 +29,12 @@ export default class ModTag extends React.Component {
});
}
- postTag = async () => {
- try {
- await this.props.postTag();
- }
- catch(err) {
- this.props.notify('error', getErrorMessages(err));
- }
+ openFeaturedDialog = (comment, asset) => {
+ this.props.openFeaturedDialog(comment, asset);
}
render() {
- const {alreadyTagged, deleteTag} = this.props;
+ const {alreadyTagged, deleteTag, comment, asset} = this.props;
return alreadyTagged ? (