mirror of
https://github.com/wassname/talk.git
synced 2026-10-30 13:50:47 +08:00
Allow passing custom fragments to withReaction and withTag
This commit is contained in:
1 parent
0cbf6e24f7
commit
b8452b535b
4 files changed
+44
-10
No files matched your search
@@ -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