mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 13:22:27 +08:00
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
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 'coral-embed-stream/src/actions/stream';
|
|
|
|
const mapDispatchToProps = (dispatch) =>
|
|
bindActionCreators({
|
|
setActiveTab,
|
|
}, dispatch);
|
|
|
|
const enhance = compose(
|
|
connect(null, mapDispatchToProps),
|
|
withFragments({
|
|
asset: gql`
|
|
fragment TalkFeatured_TabPane_asset on Asset {
|
|
id
|
|
featuredComments: comments(tags: ["FEATURED"], excludeIgnored: $excludeIgnored, deep: true) {
|
|
nodes {
|
|
id
|
|
body
|
|
created_at
|
|
replyCount
|
|
tags {
|
|
tag {
|
|
name
|
|
}
|
|
}
|
|
action_summaries {
|
|
... on LikeActionSummary {
|
|
count
|
|
current_user {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
user {
|
|
id
|
|
username
|
|
}
|
|
}
|
|
}
|
|
}`,
|
|
}),
|
|
);
|
|
|
|
export default enhance(TabPane);
|