{"action":"created","comment":{"url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/comments/130080534","pull_request_review_id":52919288,"id":130080534,"diff_hunk":"@@ -1,9 +1,64 @@\n-import React, { Component } from 'react'\n+import { connect } from 'react-redux';\n+import { bindActionCreators } from 'redux';\n+import React, { Component } from 'react';\n+import { Grid, Row, Col, Thumbnail } from 'react-bootstrap';\n+\n+import firebaseDb from '../../../firebase/firebaseDb';\n+// import firebaseStor from '../../../firebase/firebaseStor';\n+\n+import {\n+  fetchItemsSuccess,\n+  fetchItemsFailure,\n+} from '../../../redux/readWrite/readWriteActionCreators';\n+\n+class Home extends Component {\n+  constructor() {\n+    super();\n+    this.fetchItems();\n+  }\n+\n+  fetchItems() {\n+    firebaseDb.dbRef('/ads').once('value').then(\n+      snapshot => this.props.fetchItemsSuccess(snapshot.val()),\n+      () => this.props.fetchItemsFailure(),\n+    );\n+  }\n+\n+  renderItems() {\n+    if (this.props.items !== null) {\n+      const items = this.props.items;\n+      return Object.keys(items).map(key => (\n+        <Col key={key} sm={6} md={3}>\n+          {items[key].name}\n+          <Thumbnail href=\"#\" alt=\"171x180\" />\n+        </Col>\n+      ));\n+    }\n+    return <div>No items</div>;\n+  }\n \n-export default class Home extends Component {\n   render() {\n     return (\n-      <div>Home</div>\n+      <Grid>\n+        <Row className=\"show-grid\">\n+          {this.renderItems()}\n+        </Row>\n+      </Grid>\n     );\n   }\n }\n+\n+function mapDispatchToProps(dispatch) {\n+  return bindActionCreators({\n+    fetchItemsSuccess,\n+    fetchItemsFailure,\n+  }, dispatch);\n+}\n+\n+function mapStateToProps(state) {\n+  return {\n+    items: state.items,","path":"src/app/react/components/pages/Home.jsx","position":63,"original_position":63,"commit_id":"61842afea3f9740487bdd1da98c91800622bdb7f","original_commit_id":"61842afea3f9740487bdd1da98c91800622bdb7f","user":{"login":"simutis","id":3881587,"avatar_url":"https://avatars2.githubusercontent.com/u/3881587?v=4","gravatar_id":"","url":"https://api.github.com/users/simutis","html_url":"https://github.com/simutis","followers_url":"https://api.github.com/users/simutis/followers","following_url":"https://api.github.com/users/simutis/following{/other_user}","gists_url":"https://api.github.com/users/simutis/gists{/gist_id}","starred_url":"https://api.github.com/users/simutis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simutis/subscriptions","organizations_url":"https://api.github.com/users/simutis/orgs","repos_url":"https://api.github.com/users/simutis/repos","events_url":"https://api.github.com/users/simutis/events{/privacy}","received_events_url":"https://api.github.com/users/simutis/received_events","type":"User","site_admin":false},"body":"items labai jau \"generic\" pavadinimas pakeisk i kas is tikruju ten ira pvz(\"userAds\")\r\nar \"ads\"","created_at":"2017-07-28T12:45:36Z","updated_at":"2017-07-28T12:49:34Z","html_url":"https://github.com/yogintas/firebase-react-redux/pull/4#discussion_r130080534","pull_request_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/comments/130080534"},"html":{"href":"https://github.com/yogintas/firebase-react-redux/pull/4#discussion_r130080534"},"pull_request":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4","id":132959603,"html_url":"https://github.com/yogintas/firebase-react-redux/pull/4","diff_url":"https://github.com/yogintas/firebase-react-redux/pull/4.diff","patch_url":"https://github.com/yogintas/firebase-react-redux/pull/4.patch","issue_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/4","number":4,"state":"open","locked":false,"title":"Home/layout+fetch items","user":{"login":"yogintas","id":20511483,"avatar_url":"https://avatars0.githubusercontent.com/u/20511483?v=4","gravatar_id":"","url":"https://api.github.com/users/yogintas","html_url":"https://github.com/yogintas","followers_url":"https://api.github.com/users/yogintas/followers","following_url":"https://api.github.com/users/yogintas/following{/other_user}","gists_url":"https://api.github.com/users/yogintas/gists{/gist_id}","starred_url":"https://api.github.com/users/yogintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogintas/subscriptions","organizations_url":"https://api.github.com/users/yogintas/orgs","repos_url":"https://api.github.com/users/yogintas/repos","events_url":"https://api.github.com/users/yogintas/events{/privacy}","received_events_url":"https://api.github.com/users/yogintas/received_events","type":"User","site_admin":false},"body":"Ziurek tik i tai kas yra Home.jsx, visa kita ignoruok, ten quickfixai","created_at":"2017-07-28T12:37:12Z","updated_at":"2017-07-28T12:49:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1dd12a3985e5119013286414d53dc51341957e34","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4/commits","review_comments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4/comments","review_comment_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/4/comments","statuses_url":"https://api.github.com/repos/yogintas/firebase-react-redux/statuses/61842afea3f9740487bdd1da98c91800622bdb7f","head":{"label":"yogintas:home/layout+fetchItems","ref":"home/layout+fetchItems","sha":"61842afea3f9740487bdd1da98c91800622bdb7f","user":{"login":"yogintas","id":20511483,"avatar_url":"https://avatars0.githubusercontent.com/u/20511483?v=4","gravatar_id":"","url":"https://api.github.com/users/yogintas","html_url":"https://github.com/yogintas","followers_url":"https://api.github.com/users/yogintas/followers","following_url":"https://api.github.com/users/yogintas/following{/other_user}","gists_url":"https://api.github.com/users/yogintas/gists{/gist_id}","starred_url":"https://api.github.com/users/yogintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogintas/subscriptions","organizations_url":"https://api.github.com/users/yogintas/orgs","repos_url":"https://api.github.com/users/yogintas/repos","events_url":"https://api.github.com/users/yogintas/events{/privacy}","received_events_url":"https://api.github.com/users/yogintas/received_events","type":"User","site_admin":false},"repo":{"id":96444337,"name":"firebase-react-redux","full_name":"yogintas/firebase-react-redux","owner":{"login":"yogintas","id":20511483,"avatar_url":"https://avatars0.githubusercontent.com/u/20511483?v=4","gravatar_id":"","url":"https://api.github.com/users/yogintas","html_url":"https://github.com/yogintas","followers_url":"https://api.github.com/users/yogintas/followers","following_url":"https://api.github.com/users/yogintas/following{/other_user}","gists_url":"https://api.github.com/users/yogintas/gists{/gist_id}","starred_url":"https://api.github.com/users/yogintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogintas/subscriptions","organizations_url":"https://api.github.com/users/yogintas/orgs","repos_url":"https://api.github.com/users/yogintas/repos","events_url":"https://api.github.com/users/yogintas/events{/privacy}","received_events_url":"https://api.github.com/users/yogintas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yogintas/firebase-react-redux","description":null,"fork":false,"url":"https://api.github.com/repos/yogintas/firebase-react-redux","forks_url":"https://api.github.com/repos/yogintas/firebase-react-redux/forks","keys_url":"https://api.github.com/repos/yogintas/firebase-react-redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yogintas/firebase-react-redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yogintas/firebase-react-redux/teams","hooks_url":"https://api.github.com/repos/yogintas/firebase-react-redux/hooks","issue_events_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/events{/number}","events_url":"https://api.github.com/repos/yogintas/firebase-react-redux/events","assignees_url":"https://api.github.com/repos/yogintas/firebase-react-redux/assignees{/user}","branches_url":"https://api.github.com/repos/yogintas/firebase-react-redux/branches{/branch}","tags_url":"https://api.github.com/repos/yogintas/firebase-react-redux/tags","blobs_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yogintas/firebase-react-redux/statuses/{sha}","languages_url":"https://api.github.com/repos/yogintas/firebase-react-redux/languages","stargazers_url":"https://api.github.com/repos/yogintas/firebase-react-redux/stargazers","contributors_url":"https://api.github.com/repos/yogintas/firebase-react-redux/contributors","subscribers_url":"https://api.github.com/repos/yogintas/firebase-react-redux/subscribers","subscription_url":"https://api.github.com/repos/yogintas/firebase-react-redux/subscription","commits_url":"https://api.github.com/repos/yogintas/firebase-react-redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/yogintas/firebase-react-redux/contents/{+path}","compare_url":"https://api.github.com/repos/yogintas/firebase-react-redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yogintas/firebase-react-redux/merges","archive_url":"https://api.github.com/repos/yogintas/firebase-react-redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yogintas/firebase-react-redux/downloads","issues_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues{/number}","pulls_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls{/number}","milestones_url":"https://api.github.com/repos/yogintas/firebase-react-redux/milestones{/number}","notifications_url":"https://api.github.com/repos/yogintas/firebase-react-redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yogintas/firebase-react-redux/labels{/name}","releases_url":"https://api.github.com/repos/yogintas/firebase-react-redux/releases{/id}","deployments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/deployments","created_at":"2017-07-06T15:19:39Z","updated_at":"2017-07-06T15:24:55Z","pushed_at":"2017-07-28T12:37:12Z","git_url":"git://github.com/yogintas/firebase-react-redux.git","ssh_url":"git@github.com:yogintas/firebase-react-redux.git","clone_url":"https://github.com/yogintas/firebase-react-redux.git","svn_url":"https://github.com/yogintas/firebase-react-redux","homepage":null,"size":42,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"yogintas:master","ref":"master","sha":"e56cc62a8ded5dc8561c6143f6abc9445d4e7e29","user":{"login":"yogintas","id":20511483,"avatar_url":"https://avatars0.githubusercontent.com/u/20511483?v=4","gravatar_id":"","url":"https://api.github.com/users/yogintas","html_url":"https://github.com/yogintas","followers_url":"https://api.github.com/users/yogintas/followers","following_url":"https://api.github.com/users/yogintas/following{/other_user}","gists_url":"https://api.github.com/users/yogintas/gists{/gist_id}","starred_url":"https://api.github.com/users/yogintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogintas/subscriptions","organizations_url":"https://api.github.com/users/yogintas/orgs","repos_url":"https://api.github.com/users/yogintas/repos","events_url":"https://api.github.com/users/yogintas/events{/privacy}","received_events_url":"https://api.github.com/users/yogintas/received_events","type":"User","site_admin":false},"repo":{"id":96444337,"name":"firebase-react-redux","full_name":"yogintas/firebase-react-redux","owner":{"login":"yogintas","id":20511483,"avatar_url":"https://avatars0.githubusercontent.com/u/20511483?v=4","gravatar_id":"","url":"https://api.github.com/users/yogintas","html_url":"https://github.com/yogintas","followers_url":"https://api.github.com/users/yogintas/followers","following_url":"https://api.github.com/users/yogintas/following{/other_user}","gists_url":"https://api.github.com/users/yogintas/gists{/gist_id}","starred_url":"https://api.github.com/users/yogintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogintas/subscriptions","organizations_url":"https://api.github.com/users/yogintas/orgs","repos_url":"https://api.github.com/users/yogintas/repos","events_url":"https://api.github.com/users/yogintas/events{/privacy}","received_events_url":"https://api.github.com/users/yogintas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yogintas/firebase-react-redux","description":null,"fork":false,"url":"https://api.github.com/repos/yogintas/firebase-react-redux","forks_url":"https://api.github.com/repos/yogintas/firebase-react-redux/forks","keys_url":"https://api.github.com/repos/yogintas/firebase-react-redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yogintas/firebase-react-redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yogintas/firebase-react-redux/teams","hooks_url":"https://api.github.com/repos/yogintas/firebase-react-redux/hooks","issue_events_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/events{/number}","events_url":"https://api.github.com/repos/yogintas/firebase-react-redux/events","assignees_url":"https://api.github.com/repos/yogintas/firebase-react-redux/assignees{/user}","branches_url":"https://api.github.com/repos/yogintas/firebase-react-redux/branches{/branch}","tags_url":"https://api.github.com/repos/yogintas/firebase-react-redux/tags","blobs_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yogintas/firebase-react-redux/statuses/{sha}","languages_url":"https://api.github.com/repos/yogintas/firebase-react-redux/languages","stargazers_url":"https://api.github.com/repos/yogintas/firebase-react-redux/stargazers","contributors_url":"https://api.github.com/repos/yogintas/firebase-react-redux/contributors","subscribers_url":"https://api.github.com/repos/yogintas/firebase-react-redux/subscribers","subscription_url":"https://api.github.com/repos/yogintas/firebase-react-redux/subscription","commits_url":"https://api.github.com/repos/yogintas/firebase-react-redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/yogintas/firebase-react-redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/yogintas/firebase-react-redux/contents/{+path}","compare_url":"https://api.github.com/repos/yogintas/firebase-react-redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yogintas/firebase-react-redux/merges","archive_url":"https://api.github.com/repos/yogintas/firebase-react-redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yogintas/firebase-react-redux/downloads","issues_url":"https://api.github.com/repos/yogintas/firebase-react-redux/issues{/number}","pulls_url":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls{/number}","milestones_url":"https://api.github.com/repos/yogintas/firebase-react-redux/milestones{/number}","notifications_url":"https://api.github.com/repos/yogintas/firebase-react-redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yogintas/firebase-react-redux/labels{/name}","releases_url":"https://api.github.com/repos/yogintas/firebase-react-redux/releases{/id}","deployments_url":"https://api.github.com/repos/yogintas/firebase-react-redux/deployments","created_at":"2017-07-06T15:19:39Z","updated_at":"2017-07-06T15:24:55Z","pushed_at":"2017-07-28T12:37:12Z","git_url":"git://github.com/yogintas/firebase-react-redux.git","ssh_url":"git@github.com:yogintas/firebase-react-redux.git","clone_url":"https://github.com/yogintas/firebase-react-redux.git","svn_url":"https://github.com/yogintas/firebase-react-redux","homepage":null,"size":42,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4"},"html":{"href":"https://github.com/yogintas/firebase-react-redux/pull/4"},"issue":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/4"},"comments":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/yogintas/firebase-react-redux/statuses/61842afea3f9740487bdd1da98c91800622bdb7f"}}}}
{"actor":{"display_login":"simutis"}}