mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 15:12:43 +08:00
27 lines
690 B
JavaScript
27 lines
690 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,
|
|
comment: state.comment,
|
|
asset: state.asset,
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch =>
|
|
bindActionCreators(
|
|
{
|
|
closeFeaturedDialog,
|
|
},
|
|
dispatch
|
|
);
|
|
|
|
const enhance = compose(
|
|
connect(mapStateToProps, mapDispatchToProps),
|
|
withTags('featured')
|
|
);
|
|
|
|
export default enhance(FeaturedDialog);
|