mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
16 lines
485 B
JavaScript
16 lines
485 B
JavaScript
import {compose, gql} from 'react-apollo';
|
|
import {withFragments, excludeIf} from 'plugin-api/beta/client/hocs';
|
|
import Tab from '../components/Tab';
|
|
|
|
const enhance = compose(
|
|
withFragments({
|
|
asset: gql`
|
|
fragment TalkFeaturedComments_Tab_asset on Asset {
|
|
featuredCommentsCount: totalCommentCount(tags: ["FEATURED"], excludeIgnored: $excludeIgnored)
|
|
}`,
|
|
}),
|
|
excludeIf((props) => props.asset.featuredCommentsCount === 0),
|
|
);
|
|
|
|
export default enhance(Tab);
|