mirror of
https://github.com/wassname/talk.git
synced 2026-08-01 13:00:55 +08:00
Hide featured comments tab when empty
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {compose, gql} from 'react-apollo';
|
||||
import {withFragments} from 'plugin-api/beta/client/hocs';
|
||||
import {withFragments, excludeIf} from 'plugin-api/beta/client/hocs';
|
||||
import Tab from '../components/Tab';
|
||||
|
||||
const enhance = compose(
|
||||
@@ -9,6 +9,7 @@ const enhance = compose(
|
||||
featuredCommentsCount: totalCommentCount(tags: ["FEATURED"], excludeIgnored: $excludeIgnored)
|
||||
}`,
|
||||
}),
|
||||
excludeIf((props) => props.asset.featuredCommentsCount === 0),
|
||||
);
|
||||
|
||||
export default enhance(Tab);
|
||||
|
||||
Reference in New Issue
Block a user