{"action":"created","comment":{"url":"https://api.github.com/repos/replate/replate-business/pulls/comments/179912825","pull_request_review_id":110251242,"id":179912825,"diff_hunk":"@@ -0,0 +1,97 @@\n+/** Component to render location donation history\n+ * @prop location - location object\n+ */\n+class LocationDonations extends React.Component {\n+  constructor(props) {\n+    super(props);\n+\n+    this.state = {\n+      tasks: [],\n+    }\n+  }\n+\n+  componentWillMount() {\n+    this._fetchTasks();\n+  }\n+\n+  _fetchTasks = () => {\n+    setTasks = (response) => {\n+      var arr = [];\n+      for (prop in response) {\n+        if (response[prop]['status'] == \"complete\"){\n+          arr.push(response[prop])\n+        };\n+      }\n+      arr.sort(function (a, b) {\n+        return b['id'] - a['id'];\n+      });\n+\n+      this.setState({tasks: arr});\n+    }\n+    Requester.get(APIConstants.locations.getTasks(this.props.location.id), setTasks);\n+  }\n+\n+  render() {\n+    let emptyState;\n+    if (this.state.tasks.length == 0) {\n+      emptyState = (\n+        <div className=\"empty-table-container\">\n+          <h1>No previous donations yet!</h1>\n+        </div>\n+      );\n+    }\n+\n+    const donations = this.state.tasks.map((item, index) => {\n+      return (\n+        <DonationRow item = {item}\n+                    key  = {index} />\n+      );\n+    });\n+\n+    return (\n+      <div className=\"row\">\n+          <h1 className=\"history-title marginBot-md\">Donation History</h1>\n+          <div className=\"history-table-container\">\n+            { emptyState }","path":"app/assets/javascripts/components/locations/location_donations.jsx","position":55,"original_position":55,"commit_id":"498127777ec61cfe1007592984852aee9679578f","original_commit_id":"498127777ec61cfe1007592984852aee9679578f","user":{"login":"michaeldo2","id":10657126,"avatar_url":"https://avatars1.githubusercontent.com/u/10657126?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeldo2","html_url":"https://github.com/michaeldo2","followers_url":"https://api.github.com/users/michaeldo2/followers","following_url":"https://api.github.com/users/michaeldo2/following{/other_user}","gists_url":"https://api.github.com/users/michaeldo2/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldo2/subscriptions","organizations_url":"https://api.github.com/users/michaeldo2/orgs","repos_url":"https://api.github.com/users/michaeldo2/repos","events_url":"https://api.github.com/users/michaeldo2/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldo2/received_events","type":"User","site_admin":false},"body":"On line 35 `emptyState` is initialized with value undefined, you'll want to initialize it to `null`. React wont let you render undefined i think?","created_at":"2018-04-07T09:31:20Z","updated_at":"2018-04-07T09:32:45Z","html_url":"https://github.com/replate/replate-business/pull/412#discussion_r179912825","pull_request_url":"https://api.github.com/repos/replate/replate-business/pulls/412","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/replate/replate-business/pulls/comments/179912825"},"html":{"href":"https://github.com/replate/replate-business/pull/412#discussion_r179912825"},"pull_request":{"href":"https://api.github.com/repos/replate/replate-business/pulls/412"}}},"pull_request":{"url":"https://api.github.com/repos/replate/replate-business/pulls/412","id":174188908,"html_url":"https://github.com/replate/replate-business/pull/412","diff_url":"https://github.com/replate/replate-business/pull/412.diff","patch_url":"https://github.com/replate/replate-business/pull/412.patch","issue_url":"https://api.github.com/repos/replate/replate-business/issues/412","number":412,"state":"open","locked":false,"title":"Donation receipt","user":{"login":"nhiquach","id":8717024,"avatar_url":"https://avatars2.githubusercontent.com/u/8717024?v=4","gravatar_id":"","url":"https://api.github.com/users/nhiquach","html_url":"https://github.com/nhiquach","followers_url":"https://api.github.com/users/nhiquach/followers","following_url":"https://api.github.com/users/nhiquach/following{/other_user}","gists_url":"https://api.github.com/users/nhiquach/gists{/gist_id}","starred_url":"https://api.github.com/users/nhiquach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhiquach/subscriptions","organizations_url":"https://api.github.com/users/nhiquach/orgs","repos_url":"https://api.github.com/users/nhiquach/repos","events_url":"https://api.github.com/users/nhiquach/events{/privacy}","received_events_url":"https://api.github.com/users/nhiquach/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nCreates Donation Receipt Template \r\n\r\n### Status\r\nREADY\r\n\r\n### Migrations\r\nNO\r\n\r\n### Description of Testing Done\r\n\r\n### Todos\r\n- [ ] Testing\r\n- [ ] Documentation/`annotate`\r\n\r\n### Screenshots\r\n![donation_receipt](https://user-images.githubusercontent.com/8717024/37246609-5d6f6004-2461-11e8-8321-3cfa9fe8f411.png)\r\n\r\nCC: @michaeldo2 @michellejkwon \r\n","created_at":"2018-03-10T20:49:16Z","updated_at":"2018-04-07T09:32:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"022f9a8793eb4e8557ab68c9f697b1dcd46fc3cc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/replate/replate-business/pulls/412/commits","review_comments_url":"https://api.github.com/repos/replate/replate-business/pulls/412/comments","review_comment_url":"https://api.github.com/repos/replate/replate-business/pulls/comments{/number}","comments_url":"https://api.github.com/repos/replate/replate-business/issues/412/comments","statuses_url":"https://api.github.com/repos/replate/replate-business/statuses/498127777ec61cfe1007592984852aee9679578f","head":{"label":"replate:donation-receipt","ref":"donation-receipt","sha":"498127777ec61cfe1007592984852aee9679578f","user":{"login":"replate","id":18646633,"avatar_url":"https://avatars2.githubusercontent.com/u/18646633?v=4","gravatar_id":"","url":"https://api.github.com/users/replate","html_url":"https://github.com/replate","followers_url":"https://api.github.com/users/replate/followers","following_url":"https://api.github.com/users/replate/following{/other_user}","gists_url":"https://api.github.com/users/replate/gists{/gist_id}","starred_url":"https://api.github.com/users/replate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/replate/subscriptions","organizations_url":"https://api.github.com/users/replate/orgs","repos_url":"https://api.github.com/users/replate/repos","events_url":"https://api.github.com/users/replate/events{/privacy}","received_events_url":"https://api.github.com/users/replate/received_events","type":"Organization","site_admin":false},"repo":{"id":71021454,"name":"replate-business","full_name":"replate/replate-business","owner":{"login":"replate","id":18646633,"avatar_url":"https://avatars2.githubusercontent.com/u/18646633?v=4","gravatar_id":"","url":"https://api.github.com/users/replate","html_url":"https://github.com/replate","followers_url":"https://api.github.com/users/replate/followers","following_url":"https://api.github.com/users/replate/following{/other_user}","gists_url":"https://api.github.com/users/replate/gists{/gist_id}","starred_url":"https://api.github.com/users/replate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/replate/subscriptions","organizations_url":"https://api.github.com/users/replate/orgs","repos_url":"https://api.github.com/users/replate/repos","events_url":"https://api.github.com/users/replate/events{/privacy}","received_events_url":"https://api.github.com/users/replate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/replate/replate-business","description":"Marketing website and online portal for Replate businesses to request pickups.","fork":false,"url":"https://api.github.com/repos/replate/replate-business","forks_url":"https://api.github.com/repos/replate/replate-business/forks","keys_url":"https://api.github.com/repos/replate/replate-business/keys{/key_id}","collaborators_url":"https://api.github.com/repos/replate/replate-business/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/replate/replate-business/teams","hooks_url":"https://api.github.com/repos/replate/replate-business/hooks","issue_events_url":"https://api.github.com/repos/replate/replate-business/issues/events{/number}","events_url":"https://api.github.com/repos/replate/replate-business/events","assignees_url":"https://api.github.com/repos/replate/replate-business/assignees{/user}","branches_url":"https://api.github.com/repos/replate/replate-business/branches{/branch}","tags_url":"https://api.github.com/repos/replate/replate-business/tags","blobs_url":"https://api.github.com/repos/replate/replate-business/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/replate/replate-business/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/replate/replate-business/git/refs{/sha}","trees_url":"https://api.github.com/repos/replate/replate-business/git/trees{/sha}","statuses_url":"https://api.github.com/repos/replate/replate-business/statuses/{sha}","languages_url":"https://api.github.com/repos/replate/replate-business/languages","stargazers_url":"https://api.github.com/repos/replate/replate-business/stargazers","contributors_url":"https://api.github.com/repos/replate/replate-business/contributors","subscribers_url":"https://api.github.com/repos/replate/replate-business/subscribers","subscription_url":"https://api.github.com/repos/replate/replate-business/subscription","commits_url":"https://api.github.com/repos/replate/replate-business/commits{/sha}","git_commits_url":"https://api.github.com/repos/replate/replate-business/git/commits{/sha}","comments_url":"https://api.github.com/repos/replate/replate-business/comments{/number}","issue_comment_url":"https://api.github.com/repos/replate/replate-business/issues/comments{/number}","contents_url":"https://api.github.com/repos/replate/replate-business/contents/{+path}","compare_url":"https://api.github.com/repos/replate/replate-business/compare/{base}...{head}","merges_url":"https://api.github.com/repos/replate/replate-business/merges","archive_url":"https://api.github.com/repos/replate/replate-business/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/replate/replate-business/downloads","issues_url":"https://api.github.com/repos/replate/replate-business/issues{/number}","pulls_url":"https://api.github.com/repos/replate/replate-business/pulls{/number}","milestones_url":"https://api.github.com/repos/replate/replate-business/milestones{/number}","notifications_url":"https://api.github.com/repos/replate/replate-business/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/replate/replate-business/labels{/name}","releases_url":"https://api.github.com/repos/replate/replate-business/releases{/id}","deployments_url":"https://api.github.com/repos/replate/replate-business/deployments","created_at":"2016-10-16T00:28:11Z","updated_at":"2018-04-05T23:00:50Z","pushed_at":"2018-04-07T01:19:49Z","git_url":"git://github.com/replate/replate-business.git","ssh_url":"git@github.com:replate/replate-business.git","clone_url":"https://github.com/replate/replate-business.git","svn_url":"https://github.com/replate/replate-business","homepage":"https://www.re-plate.org","size":34248,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":5,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"replate:master","ref":"master","sha":"787baa911063a375db2a6ecdebdb47f9d8c4ca96","user":{"login":"replate","id":18646633,"avatar_url":"https://avatars2.githubusercontent.com/u/18646633?v=4","gravatar_id":"","url":"https://api.github.com/users/replate","html_url":"https://github.com/replate","followers_url":"https://api.github.com/users/replate/followers","following_url":"https://api.github.com/users/replate/following{/other_user}","gists_url":"https://api.github.com/users/replate/gists{/gist_id}","starred_url":"https://api.github.com/users/replate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/replate/subscriptions","organizations_url":"https://api.github.com/users/replate/orgs","repos_url":"https://api.github.com/users/replate/repos","events_url":"https://api.github.com/users/replate/events{/privacy}","received_events_url":"https://api.github.com/users/replate/received_events","type":"Organization","site_admin":false},"repo":{"id":71021454,"name":"replate-business","full_name":"replate/replate-business","owner":{"login":"replate","id":18646633,"avatar_url":"https://avatars2.githubusercontent.com/u/18646633?v=4","gravatar_id":"","url":"https://api.github.com/users/replate","html_url":"https://github.com/replate","followers_url":"https://api.github.com/users/replate/followers","following_url":"https://api.github.com/users/replate/following{/other_user}","gists_url":"https://api.github.com/users/replate/gists{/gist_id}","starred_url":"https://api.github.com/users/replate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/replate/subscriptions","organizations_url":"https://api.github.com/users/replate/orgs","repos_url":"https://api.github.com/users/replate/repos","events_url":"https://api.github.com/users/replate/events{/privacy}","received_events_url":"https://api.github.com/users/replate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/replate/replate-business","description":"Marketing website and online portal for Replate businesses to request pickups.","fork":false,"url":"https://api.github.com/repos/replate/replate-business","forks_url":"https://api.github.com/repos/replate/replate-business/forks","keys_url":"https://api.github.com/repos/replate/replate-business/keys{/key_id}","collaborators_url":"https://api.github.com/repos/replate/replate-business/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/replate/replate-business/teams","hooks_url":"https://api.github.com/repos/replate/replate-business/hooks","issue_events_url":"https://api.github.com/repos/replate/replate-business/issues/events{/number}","events_url":"https://api.github.com/repos/replate/replate-business/events","assignees_url":"https://api.github.com/repos/replate/replate-business/assignees{/user}","branches_url":"https://api.github.com/repos/replate/replate-business/branches{/branch}","tags_url":"https://api.github.com/repos/replate/replate-business/tags","blobs_url":"https://api.github.com/repos/replate/replate-business/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/replate/replate-business/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/replate/replate-business/git/refs{/sha}","trees_url":"https://api.github.com/repos/replate/replate-business/git/trees{/sha}","statuses_url":"https://api.github.com/repos/replate/replate-business/statuses/{sha}","languages_url":"https://api.github.com/repos/replate/replate-business/languages","stargazers_url":"https://api.github.com/repos/replate/replate-business/stargazers","contributors_url":"https://api.github.com/repos/replate/replate-business/contributors","subscribers_url":"https://api.github.com/repos/replate/replate-business/subscribers","subscription_url":"https://api.github.com/repos/replate/replate-business/subscription","commits_url":"https://api.github.com/repos/replate/replate-business/commits{/sha}","git_commits_url":"https://api.github.com/repos/replate/replate-business/git/commits{/sha}","comments_url":"https://api.github.com/repos/replate/replate-business/comments{/number}","issue_comment_url":"https://api.github.com/repos/replate/replate-business/issues/comments{/number}","contents_url":"https://api.github.com/repos/replate/replate-business/contents/{+path}","compare_url":"https://api.github.com/repos/replate/replate-business/compare/{base}...{head}","merges_url":"https://api.github.com/repos/replate/replate-business/merges","archive_url":"https://api.github.com/repos/replate/replate-business/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/replate/replate-business/downloads","issues_url":"https://api.github.com/repos/replate/replate-business/issues{/number}","pulls_url":"https://api.github.com/repos/replate/replate-business/pulls{/number}","milestones_url":"https://api.github.com/repos/replate/replate-business/milestones{/number}","notifications_url":"https://api.github.com/repos/replate/replate-business/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/replate/replate-business/labels{/name}","releases_url":"https://api.github.com/repos/replate/replate-business/releases{/id}","deployments_url":"https://api.github.com/repos/replate/replate-business/deployments","created_at":"2016-10-16T00:28:11Z","updated_at":"2018-04-05T23:00:50Z","pushed_at":"2018-04-07T01:19:49Z","git_url":"git://github.com/replate/replate-business.git","ssh_url":"git@github.com:replate/replate-business.git","clone_url":"https://github.com/replate/replate-business.git","svn_url":"https://github.com/replate/replate-business","homepage":"https://www.re-plate.org","size":34248,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":5,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/replate/replate-business/pulls/412"},"html":{"href":"https://github.com/replate/replate-business/pull/412"},"issue":{"href":"https://api.github.com/repos/replate/replate-business/issues/412"},"comments":{"href":"https://api.github.com/repos/replate/replate-business/issues/412/comments"},"review_comments":{"href":"https://api.github.com/repos/replate/replate-business/pulls/412/comments"},"review_comment":{"href":"https://api.github.com/repos/replate/replate-business/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/replate/replate-business/pulls/412/commits"},"statuses":{"href":"https://api.github.com/repos/replate/replate-business/statuses/498127777ec61cfe1007592984852aee9679578f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"michaeldo2"}}