{"action":"created","comment":{"url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/comments/253994521","pull_request_review_id":200237252,"id":253994521,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1Mzk5NDUyMQ==","diff_hunk":"@@ -4,23 +4,40 @@ import PropTypes from 'prop-types';\n import AnswerTag from '../AnswerTag/AnswerTag';\n import AnswerActions from '../AnswerActions/AnswerActions';\n \n-\n class Answer extends React.Component {\n+    constructor(props) {\n+        super(props);\n+        this.state = {\n+            answer: this.props.answer,\n+        }\n+    }\n+\n+    handleLike = answer => {\n+        let answerClone = this.state.answer;\n+        answerClone.liked = !answer.liked;\n+        const index = answer.likerList.indexOf(this.props.username);","path":"src/Components/Answer/Answer.js","position":15,"original_position":16,"commit_id":"e5e6ee5423f20d9b7026ed37363d6f8cabb262b8","original_commit_id":"39b2dde08c9b9387ee5540711a06624dcd8138b6","user":{"login":"AlexDovgalenok","id":43251033,"node_id":"MDQ6VXNlcjQzMjUxMDMz","avatar_url":"https://avatars0.githubusercontent.com/u/43251033?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDovgalenok","html_url":"https://github.com/AlexDovgalenok","followers_url":"https://api.github.com/users/AlexDovgalenok/followers","following_url":"https://api.github.com/users/AlexDovgalenok/following{/other_user}","gists_url":"https://api.github.com/users/AlexDovgalenok/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDovgalenok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDovgalenok/subscriptions","organizations_url":"https://api.github.com/users/AlexDovgalenok/orgs","repos_url":"https://api.github.com/users/AlexDovgalenok/repos","events_url":"https://api.github.com/users/AlexDovgalenok/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDovgalenok/received_events","type":"User","site_admin":false},"body":"Will be better iif you declare all variables on one place at the top of function","created_at":"2019-02-05T18:42:21Z","updated_at":"2019-02-05T18:54:07Z","html_url":"https://github.com/dorogenskaya/sreda/pull/3#discussion_r253994521","pull_request_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/comments/253994521"},"html":{"href":"https://github.com/dorogenskaya/sreda/pull/3#discussion_r253994521"},"pull_request":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3","id":249987380,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ5OTg3Mzgw","html_url":"https://github.com/dorogenskaya/sreda/pull/3","diff_url":"https://github.com/dorogenskaya/sreda/pull/3.diff","patch_url":"https://github.com/dorogenskaya/sreda/pull/3.patch","issue_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/3","number":3,"state":"open","locked":false,"title":"Like counter","user":{"login":"doraby","id":10120016,"node_id":"MDQ6VXNlcjEwMTIwMDE2","avatar_url":"https://avatars2.githubusercontent.com/u/10120016?v=4","gravatar_id":"","url":"https://api.github.com/users/doraby","html_url":"https://github.com/doraby","followers_url":"https://api.github.com/users/doraby/followers","following_url":"https://api.github.com/users/doraby/following{/other_user}","gists_url":"https://api.github.com/users/doraby/gists{/gist_id}","starred_url":"https://api.github.com/users/doraby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doraby/subscriptions","organizations_url":"https://api.github.com/users/doraby/orgs","repos_url":"https://api.github.com/users/doraby/repos","events_url":"https://api.github.com/users/doraby/events{/privacy}","received_events_url":"https://api.github.com/users/doraby/received_events","type":"User","site_admin":false},"body":"Add like button and list of the likers\r\nAdd static favorite button\r\nUse Button component from the and.design\r\nConnect ant.design css to theme\r\n","created_at":"2019-02-04T09:39:41Z","updated_at":"2019-02-05T18:54:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"524d56eba598e74a1975d463f2505164e781eab8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3/commits","review_comments_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3/comments","review_comment_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/3/comments","statuses_url":"https://api.github.com/repos/dorogenskaya/sreda/statuses/e5e6ee5423f20d9b7026ed37363d6f8cabb262b8","head":{"label":"dorogenskaya:like-counter","ref":"like-counter","sha":"e5e6ee5423f20d9b7026ed37363d6f8cabb262b8","user":{"login":"dorogenskaya","id":10120027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTIwMDI3","avatar_url":"https://avatars0.githubusercontent.com/u/10120027?v=4","gravatar_id":"","url":"https://api.github.com/users/dorogenskaya","html_url":"https://github.com/dorogenskaya","followers_url":"https://api.github.com/users/dorogenskaya/followers","following_url":"https://api.github.com/users/dorogenskaya/following{/other_user}","gists_url":"https://api.github.com/users/dorogenskaya/gists{/gist_id}","starred_url":"https://api.github.com/users/dorogenskaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorogenskaya/subscriptions","organizations_url":"https://api.github.com/users/dorogenskaya/orgs","repos_url":"https://api.github.com/users/dorogenskaya/repos","events_url":"https://api.github.com/users/dorogenskaya/events{/privacy}","received_events_url":"https://api.github.com/users/dorogenskaya/received_events","type":"Organization","site_admin":false},"repo":{"id":145025859,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMjU4NTk=","name":"sreda","full_name":"dorogenskaya/sreda","private":false,"owner":{"login":"dorogenskaya","id":10120027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTIwMDI3","avatar_url":"https://avatars0.githubusercontent.com/u/10120027?v=4","gravatar_id":"","url":"https://api.github.com/users/dorogenskaya","html_url":"https://github.com/dorogenskaya","followers_url":"https://api.github.com/users/dorogenskaya/followers","following_url":"https://api.github.com/users/dorogenskaya/following{/other_user}","gists_url":"https://api.github.com/users/dorogenskaya/gists{/gist_id}","starred_url":"https://api.github.com/users/dorogenskaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorogenskaya/subscriptions","organizations_url":"https://api.github.com/users/dorogenskaya/orgs","repos_url":"https://api.github.com/users/dorogenskaya/repos","events_url":"https://api.github.com/users/dorogenskaya/events{/privacy}","received_events_url":"https://api.github.com/users/dorogenskaya/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dorogenskaya/sreda","description":null,"fork":false,"url":"https://api.github.com/repos/dorogenskaya/sreda","forks_url":"https://api.github.com/repos/dorogenskaya/sreda/forks","keys_url":"https://api.github.com/repos/dorogenskaya/sreda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dorogenskaya/sreda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dorogenskaya/sreda/teams","hooks_url":"https://api.github.com/repos/dorogenskaya/sreda/hooks","issue_events_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/events{/number}","events_url":"https://api.github.com/repos/dorogenskaya/sreda/events","assignees_url":"https://api.github.com/repos/dorogenskaya/sreda/assignees{/user}","branches_url":"https://api.github.com/repos/dorogenskaya/sreda/branches{/branch}","tags_url":"https://api.github.com/repos/dorogenskaya/sreda/tags","blobs_url":"https://api.github.com/repos/dorogenskaya/sreda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dorogenskaya/sreda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dorogenskaya/sreda/git/refs{/sha}","trees_url":"https://api.github.com/repos/dorogenskaya/sreda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dorogenskaya/sreda/statuses/{sha}","languages_url":"https://api.github.com/repos/dorogenskaya/sreda/languages","stargazers_url":"https://api.github.com/repos/dorogenskaya/sreda/stargazers","contributors_url":"https://api.github.com/repos/dorogenskaya/sreda/contributors","subscribers_url":"https://api.github.com/repos/dorogenskaya/sreda/subscribers","subscription_url":"https://api.github.com/repos/dorogenskaya/sreda/subscription","commits_url":"https://api.github.com/repos/dorogenskaya/sreda/commits{/sha}","git_commits_url":"https://api.github.com/repos/dorogenskaya/sreda/git/commits{/sha}","comments_url":"https://api.github.com/repos/dorogenskaya/sreda/comments{/number}","issue_comment_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/comments{/number}","contents_url":"https://api.github.com/repos/dorogenskaya/sreda/contents/{+path}","compare_url":"https://api.github.com/repos/dorogenskaya/sreda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dorogenskaya/sreda/merges","archive_url":"https://api.github.com/repos/dorogenskaya/sreda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dorogenskaya/sreda/downloads","issues_url":"https://api.github.com/repos/dorogenskaya/sreda/issues{/number}","pulls_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls{/number}","milestones_url":"https://api.github.com/repos/dorogenskaya/sreda/milestones{/number}","notifications_url":"https://api.github.com/repos/dorogenskaya/sreda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dorogenskaya/sreda/labels{/name}","releases_url":"https://api.github.com/repos/dorogenskaya/sreda/releases{/id}","deployments_url":"https://api.github.com/repos/dorogenskaya/sreda/deployments","created_at":"2018-08-16T18:36:30Z","updated_at":"2019-02-03T13:11:26Z","pushed_at":"2019-02-05T18:51:31Z","git_url":"git://github.com/dorogenskaya/sreda.git","ssh_url":"git@github.com:dorogenskaya/sreda.git","clone_url":"https://github.com/dorogenskaya/sreda.git","svn_url":"https://github.com/dorogenskaya/sreda","homepage":null,"size":20381,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dorogenskaya:master","ref":"master","sha":"27897f701328beff2527bcfbfca4d947864ccb56","user":{"login":"dorogenskaya","id":10120027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTIwMDI3","avatar_url":"https://avatars0.githubusercontent.com/u/10120027?v=4","gravatar_id":"","url":"https://api.github.com/users/dorogenskaya","html_url":"https://github.com/dorogenskaya","followers_url":"https://api.github.com/users/dorogenskaya/followers","following_url":"https://api.github.com/users/dorogenskaya/following{/other_user}","gists_url":"https://api.github.com/users/dorogenskaya/gists{/gist_id}","starred_url":"https://api.github.com/users/dorogenskaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorogenskaya/subscriptions","organizations_url":"https://api.github.com/users/dorogenskaya/orgs","repos_url":"https://api.github.com/users/dorogenskaya/repos","events_url":"https://api.github.com/users/dorogenskaya/events{/privacy}","received_events_url":"https://api.github.com/users/dorogenskaya/received_events","type":"Organization","site_admin":false},"repo":{"id":145025859,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMjU4NTk=","name":"sreda","full_name":"dorogenskaya/sreda","private":false,"owner":{"login":"dorogenskaya","id":10120027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTIwMDI3","avatar_url":"https://avatars0.githubusercontent.com/u/10120027?v=4","gravatar_id":"","url":"https://api.github.com/users/dorogenskaya","html_url":"https://github.com/dorogenskaya","followers_url":"https://api.github.com/users/dorogenskaya/followers","following_url":"https://api.github.com/users/dorogenskaya/following{/other_user}","gists_url":"https://api.github.com/users/dorogenskaya/gists{/gist_id}","starred_url":"https://api.github.com/users/dorogenskaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorogenskaya/subscriptions","organizations_url":"https://api.github.com/users/dorogenskaya/orgs","repos_url":"https://api.github.com/users/dorogenskaya/repos","events_url":"https://api.github.com/users/dorogenskaya/events{/privacy}","received_events_url":"https://api.github.com/users/dorogenskaya/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dorogenskaya/sreda","description":null,"fork":false,"url":"https://api.github.com/repos/dorogenskaya/sreda","forks_url":"https://api.github.com/repos/dorogenskaya/sreda/forks","keys_url":"https://api.github.com/repos/dorogenskaya/sreda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dorogenskaya/sreda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dorogenskaya/sreda/teams","hooks_url":"https://api.github.com/repos/dorogenskaya/sreda/hooks","issue_events_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/events{/number}","events_url":"https://api.github.com/repos/dorogenskaya/sreda/events","assignees_url":"https://api.github.com/repos/dorogenskaya/sreda/assignees{/user}","branches_url":"https://api.github.com/repos/dorogenskaya/sreda/branches{/branch}","tags_url":"https://api.github.com/repos/dorogenskaya/sreda/tags","blobs_url":"https://api.github.com/repos/dorogenskaya/sreda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dorogenskaya/sreda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dorogenskaya/sreda/git/refs{/sha}","trees_url":"https://api.github.com/repos/dorogenskaya/sreda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dorogenskaya/sreda/statuses/{sha}","languages_url":"https://api.github.com/repos/dorogenskaya/sreda/languages","stargazers_url":"https://api.github.com/repos/dorogenskaya/sreda/stargazers","contributors_url":"https://api.github.com/repos/dorogenskaya/sreda/contributors","subscribers_url":"https://api.github.com/repos/dorogenskaya/sreda/subscribers","subscription_url":"https://api.github.com/repos/dorogenskaya/sreda/subscription","commits_url":"https://api.github.com/repos/dorogenskaya/sreda/commits{/sha}","git_commits_url":"https://api.github.com/repos/dorogenskaya/sreda/git/commits{/sha}","comments_url":"https://api.github.com/repos/dorogenskaya/sreda/comments{/number}","issue_comment_url":"https://api.github.com/repos/dorogenskaya/sreda/issues/comments{/number}","contents_url":"https://api.github.com/repos/dorogenskaya/sreda/contents/{+path}","compare_url":"https://api.github.com/repos/dorogenskaya/sreda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dorogenskaya/sreda/merges","archive_url":"https://api.github.com/repos/dorogenskaya/sreda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dorogenskaya/sreda/downloads","issues_url":"https://api.github.com/repos/dorogenskaya/sreda/issues{/number}","pulls_url":"https://api.github.com/repos/dorogenskaya/sreda/pulls{/number}","milestones_url":"https://api.github.com/repos/dorogenskaya/sreda/milestones{/number}","notifications_url":"https://api.github.com/repos/dorogenskaya/sreda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dorogenskaya/sreda/labels{/name}","releases_url":"https://api.github.com/repos/dorogenskaya/sreda/releases{/id}","deployments_url":"https://api.github.com/repos/dorogenskaya/sreda/deployments","created_at":"2018-08-16T18:36:30Z","updated_at":"2019-02-03T13:11:26Z","pushed_at":"2019-02-05T18:51:31Z","git_url":"git://github.com/dorogenskaya/sreda.git","ssh_url":"git@github.com:dorogenskaya/sreda.git","clone_url":"https://github.com/dorogenskaya/sreda.git","svn_url":"https://github.com/dorogenskaya/sreda","homepage":null,"size":20381,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3"},"html":{"href":"https://github.com/dorogenskaya/sreda/pull/3"},"issue":{"href":"https://api.github.com/repos/dorogenskaya/sreda/issues/3"},"comments":{"href":"https://api.github.com/repos/dorogenskaya/sreda/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dorogenskaya/sreda/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/dorogenskaya/sreda/statuses/e5e6ee5423f20d9b7026ed37363d6f8cabb262b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AlexDovgalenok"}}