Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
booxood committed Jan 16, 2019
1 parent 0553b29 commit e725ab4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/gitalk.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class GitalkComponent extends Component {
})
}
// Get comments via v3 api, don't require login, but sorting feature is disable
getCommentsV3 = (issue) => {
getCommentsV3 = issue => {
const { clientID, clientSecret, perPage } = this.options
const { page } = this.state
return this.getIssue()
Expand Down Expand Up @@ -346,7 +346,7 @@ class GitalkComponent extends Component {
getRef = e => {
this.publicBtnEL = e
}
reply (replyComment) {
reply = replyComment => () => {
const { comment } = this.state
const replyCommentBody = replyComment.body
let replyCommentArray = replyCommentBody.split('\n')
Expand All @@ -362,7 +362,8 @@ class GitalkComponent extends Component {
}
like (comment) {
const { owner, repo } = this.options
let { comments, user } = this.state
const { user } = this.state
let { comments } = this.state

axiosGithub.post(`/repos/${owner}/${repo}/issues/comments/${comment.id}/reactions`, {
content: 'heart'
Expand Down Expand Up @@ -395,7 +396,8 @@ class GitalkComponent extends Component {
})
}
unLike (comment) {
let { comments, user } = this.state
const { user } = this.state
let { comments } = this.state

// const { user } = this.state
// let id
Expand All @@ -411,10 +413,9 @@ class GitalkComponent extends Component {
// console.log('res:', res)
// })

const getQL = id => {
return {
operationName: 'RemoveReaction',
query: `
const getQL = id => ({
operationName: 'RemoveReaction',
query: `
mutation RemoveReaction{
removeReaction (input:{
subjectId: "${id}",
Expand All @@ -426,8 +427,7 @@ class GitalkComponent extends Component {
}
}
`
}
}
})

axiosGithub.post('/graphql', getQL(comment.gId), {
headers: {
Expand Down Expand Up @@ -657,7 +657,7 @@ class GitalkComponent extends Component {
language={language}
commentedText={this.i18n.t('commented')}
admin={admin}
replyCallback={this.reply.bind(this, c)}
replyCallback={this.reply(c)}
likeCallback={c.reactions && c.reactions.viewerHasReacted ? this.unLike.bind(this, c) : this.like.bind(this, c)}
/>
))}
Expand Down

0 comments on commit e725ab4

Please sign in to comment.