Files
talk/plugins/talk-plugin-featured-comments/client/containers/FeaturedDialog.js
T
2017-12-18 12:46:24 -03:00

22 lines
619 B
JavaScript

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';
const mapStateToProps = ({talkPluginFeaturedComments: state}) => ({
showFeaturedDialog: state.showFeaturedDialog,
});
const mapDispatchToProps = (dispatch) =>
bindActionCreators({
closeFeaturedDialog,
}, dispatch);
const enhance = compose(
withTags('featured'),
connect(mapStateToProps, mapDispatchToProps),
);
export default enhance(FeaturedDialog);