mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 17:24:02 +08:00
Merge branch 'master' into story/150848457
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import {gql} from 'react-apollo';
|
||||
import {withFragments} from 'plugin-api/beta/client/hocs';
|
||||
import CommentContent from '../components/CommentContent';
|
||||
|
||||
export default withFragments({
|
||||
comment: gql`
|
||||
fragment TalkPluginCommentContent_comment on Comment {
|
||||
body
|
||||
}`
|
||||
})(CommentContent);
|
||||
@@ -1,4 +1,4 @@
|
||||
import CommentContent from './components/CommentContent';
|
||||
import CommentContent from './containers/CommentContent';
|
||||
|
||||
export default {
|
||||
slots: {
|
||||
|
||||
@@ -13,7 +13,7 @@ class MemberSinceInfoContainer extends React.Component {
|
||||
|
||||
const withMemberSinceInfoFragments = withFragments({
|
||||
comment: gql`
|
||||
fragment TalkAuthorMenu_MemberSinceInfo_comment on Comment {
|
||||
fragment TalkMemberSince_MemberSinceInfo_comment on Comment {
|
||||
user {
|
||||
username
|
||||
created_at
|
||||
|
||||
@@ -1,9 +1,35 @@
|
||||
import MemberSinceInfo from './containers/MemberSinceInfo';
|
||||
import translations from './translations.yml';
|
||||
import {gql} from 'react-apollo';
|
||||
|
||||
export default {
|
||||
slots: {
|
||||
authorMenuInfos: [MemberSinceInfo]
|
||||
},
|
||||
translations
|
||||
translations,
|
||||
fragments: {
|
||||
CreateCommentResponse: gql`
|
||||
fragment TalkMemberSince_CreateCommentResponse on CreateCommentResponse {
|
||||
comment {
|
||||
user {
|
||||
created_at
|
||||
}
|
||||
}
|
||||
}`,
|
||||
},
|
||||
mutations: {
|
||||
PostComment: () => ({
|
||||
optimisticResponse: {
|
||||
createComment: {
|
||||
comment: {
|
||||
user: {
|
||||
created_at: new Date(),
|
||||
__typename: 'User'
|
||||
},
|
||||
__typename: 'Comment'
|
||||
}
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user