diff --git a/plugins/talk-plugin-featured-comments/client/components/FeaturedDialog.js b/plugins/talk-plugin-featured-comments/client/components/FeaturedDialog.js index 3408e0d6e..cad872e12 100644 --- a/plugins/talk-plugin-featured-comments/client/components/FeaturedDialog.js +++ b/plugins/talk-plugin-featured-comments/client/components/FeaturedDialog.js @@ -6,13 +6,13 @@ import styles from './FeaturedDialog.css'; import {t} from 'plugin-api/beta/client/services'; import Button from 'coral-ui/components/Button'; -const FeaturedDialog = ({open, onCancel, onPerform}) => ( +const FeaturedDialog = ({showFeaturedDialog, closeFeaturedDialog, postTag}) => ( - × + open={showFeaturedDialog} + onCancel={closeFeaturedDialog} > + ×

{t('talk-plugin-featured-comments.feature_comment')} @@ -25,14 +25,14 @@ const FeaturedDialog = ({open, onCancel, onPerform}) => ( @@ -41,9 +41,9 @@ const FeaturedDialog = ({open, onCancel, onPerform}) => ( ); FeaturedDialog.propTypes = { - open: PropTypes.bool, - onPerform: PropTypes.func.isRequired, - onCancel: PropTypes.func.isRequired, + showFeaturedDialog: PropTypes.bool, + postTag: PropTypes.func.isRequired, + closeFeaturedDialog: PropTypes.func.isRequired, }; export default FeaturedDialog; diff --git a/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js b/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js index b5d6ddd2d..66e9a6a30 100644 --- a/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js +++ b/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js @@ -1,28 +1,9 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import {compose} from 'react-apollo'; import {bindActionCreators} from 'redux'; import FeaturedDialog from '../components/FeaturedDialog'; import {withTags, connect} from 'plugin-api/beta/client/hocs'; import {closeFeaturedDialog} from '../actions'; -class FeaturedDialogContainer extends React.Component { - render() { - const {showFeaturedDialog, closeFeaturedDialog, postTag} = this.props; - return ; - } -} - -FeaturedDialogContainer.propTypes = { - showFeaturedDialog: PropTypes.func, - closeFeaturedDialog: PropTypes.func, - postTag: PropTypes.func, -}; - const mapStateToProps = ({talkPluginFeaturedComments: state}) => ({ showFeaturedDialog: state.showFeaturedDialog, }); @@ -37,4 +18,4 @@ const enhance = compose( connect(mapStateToProps, mapDispatchToProps), ); -export default enhance(FeaturedDialogContainer); +export default enhance(FeaturedDialog);