mirror of
https://github.com/wassname/talk.git
synced 2026-07-21 12:51:03 +08:00
Allow passing custom fragments to withReaction and withTag
This commit is contained in:
@@ -31,7 +31,6 @@ export default withFragments({
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
user {
|
||||
id
|
||||
username
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
import ModTag from '../components/ModTag';
|
||||
import {withTags} from 'plugin-api/beta/client/hocs';
|
||||
import {gql} from 'react-apollo';
|
||||
|
||||
export default withTags('featured')(ModTag);
|
||||
const fragments = {
|
||||
comment: gql`
|
||||
fragment TalkFeaturedComments_ModTag_comment on Comment {
|
||||
user {
|
||||
username
|
||||
}
|
||||
}
|
||||
`
|
||||
};
|
||||
|
||||
export default withTags('featured', {fragments})(ModTag);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user