mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 17:21:58 +08:00
34 lines
873 B
JavaScript
34 lines
873 B
JavaScript
import {connect} from 'react-redux';
|
|
import {bindActionCreators} from 'redux';
|
|
import {compose, gql} from 'react-apollo';
|
|
import TabPane from '../components/TabPane';
|
|
import {withFragments} from 'plugin-api/beta/client/hocs';
|
|
import {setActiveTab} from 'plugin-api/beta/client/actions/stream';
|
|
|
|
const mapDispatchToProps = (dispatch) =>
|
|
bindActionCreators({
|
|
setActiveTab,
|
|
}, dispatch);
|
|
|
|
const enhance = compose(
|
|
connect(null, mapDispatchToProps),
|
|
withFragments({
|
|
asset: gql`
|
|
fragment TalkFeatured_TabPane_asset on Asset {
|
|
featuredComments: comments(tags: ["FEATURED"]) {
|
|
nodes {
|
|
id
|
|
body
|
|
created_at
|
|
user {
|
|
id
|
|
username
|
|
}
|
|
}
|
|
}
|
|
}`,
|
|
}),
|
|
);
|
|
|
|
export default enhance(TabPane);
|