{"action":"created","comment":{"url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/comments/222557927","pull_request_review_id":161364281,"id":222557927,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjU1NzkyNw==","diff_hunk":"@@ -0,0 +1,52 @@\n+import React, { Component } from 'react'\n+import { bindActionCreators } from 'redux'\n+import * as Actions from '../actions/BookCardActions'\n+import { connect } from 'react-redux'\n+import classNames  from 'classnames'\n+import { NavLink } from 'react-router-dom'\n+import { Dictionary } from '../utils/dictionary'\n+import BookComments from './BookComments'\n+\n+\n+class BookCard extends Component {\n+  getId() {\n+    return this.props.match.params.id\n+  }\n+\n+  componentWillMount() {\n+    this.props.actions.loadBookCard(this.getId())\n+  }\n+\n+\n+  onDeleteClick(e) {\n+    e.preventDefault()\n+    this.props.actions.deleteBook(this.getId())\n+    this.props.actions.goBack()\n+  }\n+\n+  render() {\n+    const {authors, title, genres, isbn} = this.props.book\n+    return (\n+      <div>\n+        <div className=\"card\">\n+          <div className=\"card-header\">{Dictionary.of(authors).getValues().join(', ') + ' / ' + isbn}</div>\n+          <div className=\"card-body\">\n+            <h5 className=\"card-title\">{title}</h5>\n+            <p className=\"card-text\">{Dictionary.of(genres).getValues().join(\", \")}</p>\n+            <NavLink to={\"/book/edit/\" + this.getId()} className={classNames('btn', 'btn-primary')}>Редактировать</NavLink>\n+            <a href=\"#\" className={classNames('btn', 'btn-danger')} style={{marginLeft: '10px'}} onClick={this.onDeleteClick.bind(this)}>Удалить из библиотеки</a>\n+          </div>\n+        </div>\n+        <BookComments bookId={this.getId()}/>\n+      </div>\n+    )\n+  }\n+}\n+\n+const mapDispatchToProps = (dispatch) => {\n+  return {\n+    actions: bindActionCreators(Actions, dispatch)","path":"hw10/src/ui/containers/BookCard.js","position":48,"original_position":48,"commit_id":"577442ac511716b9f18cfda3f1070c1c57e979f6","original_commit_id":"577442ac511716b9f18cfda3f1070c1c57e979f6","user":{"login":"ydvorzhetskiy","id":5715941,"node_id":"MDQ6VXNlcjU3MTU5NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/5715941?v=4","gravatar_id":"","url":"https://api.github.com/users/ydvorzhetskiy","html_url":"https://github.com/ydvorzhetskiy","followers_url":"https://api.github.com/users/ydvorzhetskiy/followers","following_url":"https://api.github.com/users/ydvorzhetskiy/following{/other_user}","gists_url":"https://api.github.com/users/ydvorzhetskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/ydvorzhetskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ydvorzhetskiy/subscriptions","organizations_url":"https://api.github.com/users/ydvorzhetskiy/orgs","repos_url":"https://api.github.com/users/ydvorzhetskiy/repos","events_url":"https://api.github.com/users/ydvorzhetskiy/events{/privacy}","received_events_url":"https://api.github.com/users/ydvorzhetskiy/received_events","type":"User","site_admin":false},"body":"А можно просто bindAcitonCreators, тогда префикс actions можно не писать","created_at":"2018-10-04T07:11:22Z","updated_at":"2018-10-04T07:16:52Z","html_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9#discussion_r222557927","pull_request_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/comments/222557927"},"html":{"href":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9#discussion_r222557927"},"pull_request":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9","id":212884587,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODg0NTg3","html_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9","diff_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9.diff","patch_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9.patch","issue_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/9","number":9,"state":"open","locked":false,"title":"Выполнение десятого домашнего задания","user":{"login":"sokolovsky","id":1192877,"node_id":"MDQ6VXNlcjExOTI4Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192877?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolovsky","html_url":"https://github.com/sokolovsky","followers_url":"https://api.github.com/users/sokolovsky/followers","following_url":"https://api.github.com/users/sokolovsky/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsky/subscriptions","organizations_url":"https://api.github.com/users/sokolovsky/orgs","repos_url":"https://api.github.com/users/sokolovsky/repos","events_url":"https://api.github.com/users/sokolovsky/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsky/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-04T07:50:35Z","updated_at":"2018-10-04T07:16:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23bb8747a2672e9c489f56c4353da0c1ed75cd30","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9/commits","review_comments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9/comments","review_comment_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/9/comments","statuses_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/statuses/577442ac511716b9f18cfda3f1070c1c57e979f6","head":{"label":"sokolovsky:hw10","ref":"hw10","sha":"577442ac511716b9f18cfda3f1070c1c57e979f6","user":{"login":"sokolovsky","id":1192877,"node_id":"MDQ6VXNlcjExOTI4Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192877?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolovsky","html_url":"https://github.com/sokolovsky","followers_url":"https://api.github.com/users/sokolovsky/followers","following_url":"https://api.github.com/users/sokolovsky/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsky/subscriptions","organizations_url":"https://api.github.com/users/sokolovsky/orgs","repos_url":"https://api.github.com/users/sokolovsky/repos","events_url":"https://api.github.com/users/sokolovsky/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsky/received_events","type":"User","site_admin":false},"repo":{"id":139242712,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkyNDI3MTI=","name":"otus-spring-framework-2018-06","full_name":"sokolovsky/otus-spring-framework-2018-06","private":false,"owner":{"login":"sokolovsky","id":1192877,"node_id":"MDQ6VXNlcjExOTI4Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192877?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolovsky","html_url":"https://github.com/sokolovsky","followers_url":"https://api.github.com/users/sokolovsky/followers","following_url":"https://api.github.com/users/sokolovsky/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsky/subscriptions","organizations_url":"https://api.github.com/users/sokolovsky/orgs","repos_url":"https://api.github.com/users/sokolovsky/repos","events_url":"https://api.github.com/users/sokolovsky/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsky/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06","description":"Выполнение домашних заданий курса Spring Framework","fork":false,"url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06","forks_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/forks","keys_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/teams","hooks_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/hooks","issue_events_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/events{/number}","events_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/events","assignees_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/assignees{/user}","branches_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/branches{/branch}","tags_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/tags","blobs_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/refs{/sha}","trees_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/statuses/{sha}","languages_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/languages","stargazers_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/stargazers","contributors_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/contributors","subscribers_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/subscribers","subscription_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/subscription","commits_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/commits{/sha}","git_commits_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/commits{/sha}","comments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/comments{/number}","issue_comment_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/comments{/number}","contents_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/contents/{+path}","compare_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/merges","archive_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/downloads","issues_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues{/number}","pulls_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls{/number}","milestones_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/milestones{/number}","notifications_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/labels{/name}","releases_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/releases{/id}","deployments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/deployments","created_at":"2018-06-30T11:08:12Z","updated_at":"2018-09-16T12:26:52Z","pushed_at":"2018-09-30T12:59:39Z","git_url":"git://github.com/sokolovsky/otus-spring-framework-2018-06.git","ssh_url":"git@github.com:sokolovsky/otus-spring-framework-2018-06.git","clone_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06.git","svn_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06","homepage":null,"size":384,"stargazers_count":0,"watchers_count":0,"language":"Java","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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"sokolovsky:master","ref":"master","sha":"ba45a8f34863b218eb53090be6cd5a4a01760f14","user":{"login":"sokolovsky","id":1192877,"node_id":"MDQ6VXNlcjExOTI4Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192877?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolovsky","html_url":"https://github.com/sokolovsky","followers_url":"https://api.github.com/users/sokolovsky/followers","following_url":"https://api.github.com/users/sokolovsky/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsky/subscriptions","organizations_url":"https://api.github.com/users/sokolovsky/orgs","repos_url":"https://api.github.com/users/sokolovsky/repos","events_url":"https://api.github.com/users/sokolovsky/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsky/received_events","type":"User","site_admin":false},"repo":{"id":139242712,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkyNDI3MTI=","name":"otus-spring-framework-2018-06","full_name":"sokolovsky/otus-spring-framework-2018-06","private":false,"owner":{"login":"sokolovsky","id":1192877,"node_id":"MDQ6VXNlcjExOTI4Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192877?v=4","gravatar_id":"","url":"https://api.github.com/users/sokolovsky","html_url":"https://github.com/sokolovsky","followers_url":"https://api.github.com/users/sokolovsky/followers","following_url":"https://api.github.com/users/sokolovsky/following{/other_user}","gists_url":"https://api.github.com/users/sokolovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/sokolovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokolovsky/subscriptions","organizations_url":"https://api.github.com/users/sokolovsky/orgs","repos_url":"https://api.github.com/users/sokolovsky/repos","events_url":"https://api.github.com/users/sokolovsky/events{/privacy}","received_events_url":"https://api.github.com/users/sokolovsky/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06","description":"Выполнение домашних заданий курса Spring Framework","fork":false,"url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06","forks_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/forks","keys_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/teams","hooks_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/hooks","issue_events_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/events{/number}","events_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/events","assignees_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/assignees{/user}","branches_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/branches{/branch}","tags_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/tags","blobs_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/refs{/sha}","trees_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/statuses/{sha}","languages_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/languages","stargazers_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/stargazers","contributors_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/contributors","subscribers_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/subscribers","subscription_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/subscription","commits_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/commits{/sha}","git_commits_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/git/commits{/sha}","comments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/comments{/number}","issue_comment_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/comments{/number}","contents_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/contents/{+path}","compare_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/merges","archive_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/downloads","issues_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues{/number}","pulls_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls{/number}","milestones_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/milestones{/number}","notifications_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/labels{/name}","releases_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/releases{/id}","deployments_url":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/deployments","created_at":"2018-06-30T11:08:12Z","updated_at":"2018-09-16T12:26:52Z","pushed_at":"2018-09-30T12:59:39Z","git_url":"git://github.com/sokolovsky/otus-spring-framework-2018-06.git","ssh_url":"git@github.com:sokolovsky/otus-spring-framework-2018-06.git","clone_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06.git","svn_url":"https://github.com/sokolovsky/otus-spring-framework-2018-06","homepage":null,"size":384,"stargazers_count":0,"watchers_count":0,"language":"Java","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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9"},"html":{"href":"https://github.com/sokolovsky/otus-spring-framework-2018-06/pull/9"},"issue":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/9"},"comments":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/sokolovsky/otus-spring-framework-2018-06/statuses/577442ac511716b9f18cfda3f1070c1c57e979f6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ydvorzhetskiy"}}