{"action":"created","comment":{"url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments/172695208","pull_request_review_id":101757015,"id":172695208,"diff_hunk":"@@ -149,12 +139,45 @@ class CrossingMapPage extends Component {\n       selectedCommunity,\n     } = this.state;\n     const { currentUser } = this.props;\n-    const allCommunities =\n-      this.props.data &&\n-      !this.props.data.loading &&\n-      this.props.data.allCommunities\n-        ? this.props.data.allCommunities.nodes\n-        : null;\n+\n+    const isLoading =\n+      !this.props.openCrossings ||\n+      this.props.openCrossings.loading ||\n+      !this.props.closedCrossings ||\n+      this.props.closedCrossings.loading ||\n+      !this.props.cautionCrossings ||\n+      this.props.cautionCrossings.loading ||\n+      !this.props.longtermCrossings ||\n+      this.props.longtermCrossings.loading ||\n+      !this.props.allCommunities ||\n+      this.props.allCommunities.loading;\n+\n+    if (\n+      !isLoading &&\n+      (this.props.openCrossings.searchCrossings == null ||\n+        this.props.closedCrossings.searchCrossings == null ||\n+        this.props.cautionCrossings.searchCrossings == null ||\n+        this.props.longtermCrossings.searchCrossings == null)\n+    ) {\n+      // TODO: add error logging\n+      return <div>Error Loading</div>;\n+    }\n+\n+    const allCommunities = !isLoading\n+      ? this.props.allCommunities.allCommunities.nodes\n+      : null;","path":"frontend/src/components/Shared/CrossingMapPage/CrossingMapPage.js","position":66,"original_position":66,"commit_id":"99c509ff7f4a1db04097b33f4adac4dee0effa5d","original_commit_id":"99c509ff7f4a1db04097b33f4adac4dee0effa5d","user":{"login":"briaguya","id":6384156,"avatar_url":"https://avatars2.githubusercontent.com/u/6384156?v=4","gravatar_id":"","url":"https://api.github.com/users/briaguya","html_url":"https://github.com/briaguya","followers_url":"https://api.github.com/users/briaguya/followers","following_url":"https://api.github.com/users/briaguya/following{/other_user}","gists_url":"https://api.github.com/users/briaguya/gists{/gist_id}","starred_url":"https://api.github.com/users/briaguya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briaguya/subscriptions","organizations_url":"https://api.github.com/users/briaguya/orgs","repos_url":"https://api.github.com/users/briaguya/repos","events_url":"https://api.github.com/users/briaguya/events{/privacy}","received_events_url":"https://api.github.com/users/briaguya/received_events","type":"User","site_admin":false},"body":"When `isLoading` is `false`, `!isLoading && this.props.allCommunities.allCommunities.nodes` will return `false` while \r\n```\r\n!isLoading\r\n  ? this.props.allCommunities.allCommunities.nodes\r\n  : null\r\n```\r\nwill return `null`","created_at":"2018-03-06T23:24:52Z","updated_at":"2018-03-06T23:24:52Z","html_url":"https://github.com/cityofaustin/ctxfloods/pull/152#discussion_r172695208","pull_request_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments/172695208"},"html":{"href":"https://github.com/cityofaustin/ctxfloods/pull/152#discussion_r172695208"},"pull_request":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152"}},"in_reply_to_id":172684693},"pull_request":{"url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152","id":173231693,"html_url":"https://github.com/cityofaustin/ctxfloods/pull/152","diff_url":"https://github.com/cityofaustin/ctxfloods/pull/152.diff","patch_url":"https://github.com/cityofaustin/ctxfloods/pull/152.patch","issue_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/152","number":152,"state":"open","locked":false,"title":"Refactor sidebar nearby crossings","user":{"login":"briaguya","id":6384156,"avatar_url":"https://avatars2.githubusercontent.com/u/6384156?v=4","gravatar_id":"","url":"https://api.github.com/users/briaguya","html_url":"https://github.com/briaguya","followers_url":"https://api.github.com/users/briaguya/followers","following_url":"https://api.github.com/users/briaguya/following{/other_user}","gists_url":"https://api.github.com/users/briaguya/gists{/gist_id}","starred_url":"https://api.github.com/users/briaguya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briaguya/subscriptions","organizations_url":"https://api.github.com/users/briaguya/orgs","repos_url":"https://api.github.com/users/briaguya/repos","events_url":"https://api.github.com/users/briaguya/events{/privacy}","received_events_url":"https://api.github.com/users/briaguya/received_events","type":"User","site_admin":false},"body":"Previous:\r\n* CrossingMap queries DB for crossings\r\n* Mapbox api used to get nearby crossings\r\n  * Nearby crossings passed from map to sidebar\r\n\r\nCurrent:\r\n* CrossingMapPage queries DB for crossings\r\n* Crossings passed into map and sidebar\r\n* Map center used by sidebar to calculate nearby crossings","created_at":"2018-03-06T17:42:30Z","updated_at":"2018-03-06T23:24:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"365d9248dc1ab39e8ea3a7df7c961f5a3dcd90fb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152/commits","review_comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152/comments","review_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/152/comments","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/99c509ff7f4a1db04097b33f4adac4dee0effa5d","head":{"label":"cityofaustin:bds_sidebar-nearby-crossings","ref":"bds_sidebar-nearby-crossings","sha":"99c509ff7f4a1db04097b33f4adac4dee0effa5d","user":{"login":"cityofaustin","id":4871648,"avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"repo":{"id":97150687,"name":"ctxfloods","full_name":"cityofaustin/ctxfloods","owner":{"login":"cityofaustin","id":4871648,"avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cityofaustin/ctxfloods","description":"Central Texas Floods","fork":true,"url":"https://api.github.com/repos/cityofaustin/ctxfloods","forks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/forks","keys_url":"https://api.github.com/repos/cityofaustin/ctxfloods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cityofaustin/ctxfloods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cityofaustin/ctxfloods/teams","hooks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/hooks","issue_events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/events{/number}","events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/events","assignees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/assignees{/user}","branches_url":"https://api.github.com/repos/cityofaustin/ctxfloods/branches{/branch}","tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/tags","blobs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/refs{/sha}","trees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/{sha}","languages_url":"https://api.github.com/repos/cityofaustin/ctxfloods/languages","stargazers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/stargazers","contributors_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contributors","subscribers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscribers","subscription_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscription","commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/commits{/sha}","git_commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/commits{/sha}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/comments{/number}","issue_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/comments{/number}","contents_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contents/{+path}","compare_url":"https://api.github.com/repos/cityofaustin/ctxfloods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cityofaustin/ctxfloods/merges","archive_url":"https://api.github.com/repos/cityofaustin/ctxfloods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cityofaustin/ctxfloods/downloads","issues_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues{/number}","pulls_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls{/number}","milestones_url":"https://api.github.com/repos/cityofaustin/ctxfloods/milestones{/number}","notifications_url":"https://api.github.com/repos/cityofaustin/ctxfloods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cityofaustin/ctxfloods/labels{/name}","releases_url":"https://api.github.com/repos/cityofaustin/ctxfloods/releases{/id}","deployments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/deployments","created_at":"2017-07-13T17:52:44Z","updated_at":"2017-09-18T21:24:35Z","pushed_at":"2018-03-06T23:17:26Z","git_url":"git://github.com/cityofaustin/ctxfloods.git","ssh_url":"git@github.com:cityofaustin/ctxfloods.git","clone_url":"https://github.com/cityofaustin/ctxfloods.git","svn_url":"https://github.com/cityofaustin/ctxfloods","homepage":"","size":2038,"stargazers_count":2,"watchers_count":2,"language":"PLpgSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":29,"license":null,"forks":1,"open_issues":29,"watchers":2,"default_branch":"master"}},"base":{"label":"cityofaustin:master","ref":"master","sha":"d0f79eac2dcf9a8b5749aea703e12b37bb1feb05","user":{"login":"cityofaustin","id":4871648,"avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"repo":{"id":97150687,"name":"ctxfloods","full_name":"cityofaustin/ctxfloods","owner":{"login":"cityofaustin","id":4871648,"avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cityofaustin/ctxfloods","description":"Central Texas Floods","fork":true,"url":"https://api.github.com/repos/cityofaustin/ctxfloods","forks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/forks","keys_url":"https://api.github.com/repos/cityofaustin/ctxfloods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cityofaustin/ctxfloods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cityofaustin/ctxfloods/teams","hooks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/hooks","issue_events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/events{/number}","events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/events","assignees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/assignees{/user}","branches_url":"https://api.github.com/repos/cityofaustin/ctxfloods/branches{/branch}","tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/tags","blobs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/refs{/sha}","trees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/{sha}","languages_url":"https://api.github.com/repos/cityofaustin/ctxfloods/languages","stargazers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/stargazers","contributors_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contributors","subscribers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscribers","subscription_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscription","commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/commits{/sha}","git_commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/commits{/sha}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/comments{/number}","issue_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/comments{/number}","contents_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contents/{+path}","compare_url":"https://api.github.com/repos/cityofaustin/ctxfloods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cityofaustin/ctxfloods/merges","archive_url":"https://api.github.com/repos/cityofaustin/ctxfloods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cityofaustin/ctxfloods/downloads","issues_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues{/number}","pulls_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls{/number}","milestones_url":"https://api.github.com/repos/cityofaustin/ctxfloods/milestones{/number}","notifications_url":"https://api.github.com/repos/cityofaustin/ctxfloods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cityofaustin/ctxfloods/labels{/name}","releases_url":"https://api.github.com/repos/cityofaustin/ctxfloods/releases{/id}","deployments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/deployments","created_at":"2017-07-13T17:52:44Z","updated_at":"2017-09-18T21:24:35Z","pushed_at":"2018-03-06T23:17:26Z","git_url":"git://github.com/cityofaustin/ctxfloods.git","ssh_url":"git@github.com:cityofaustin/ctxfloods.git","clone_url":"https://github.com/cityofaustin/ctxfloods.git","svn_url":"https://github.com/cityofaustin/ctxfloods","homepage":"","size":2038,"stargazers_count":2,"watchers_count":2,"language":"PLpgSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":29,"license":null,"forks":1,"open_issues":29,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152"},"html":{"href":"https://github.com/cityofaustin/ctxfloods/pull/152"},"issue":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/152"},"comments":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/99c509ff7f4a1db04097b33f4adac4dee0effa5d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"briaguya"}}