{"action":"created","comment":{"url":"https://api.github.com/repos/airbaseuk/airbase/pulls/comments/173647833","pull_request_review_id":102875047,"id":173647833,"diff_hunk":"@@ -1,33 +1,44 @@\n import React, { Component } from 'react';\n import { PulseLoader } from 'react-spinners';\n import PropTypes from 'prop-types';\n+import { Redirect } from 'react-router-dom';\n \n-class LoadingStripe extends Component {\n-  constructor(props) {\n-    super(props);\n-    this.state = {\n-      loading: true\n-    };\n-  }\n+import './css/loadingStripe.css';\n \n+class LoadingStripe extends Component {\n   componentDidMount() {\n     this.props.stripeConnectCallback(\n       this.props.location.search.split('&code=')[1]\n     );\n   }\n \n   render() {\n-    return (\n-      <div>\n-        <PulseLoader color={'#123abc'} loading={this.state.loading} />\n-      </div>\n-    );\n+    const { isNewUser, isTeacher, isHost } = this.props;\n+\n+    if (isNewUser) {\n+      return <Redirect to='/users/new' />;\n+    } else {\n+      if (isTeacher) {\n+        return <Redirect to='/dashboard/teachers' />;\n+      } else if (isHost) {\n+        return <Redirect to='/dashboard/hosts' />;\n+      } else {\n+        return (\n+          <div className='loading-stripe__wrapper'>\n+            <PulseLoader color={'#123abc'} loading={true} />\n+          </div>","path":"client/src/components/stripe/LoadingStripe.js","position":41,"original_position":41,"commit_id":"1a638ced031b561e408fa62a2ca811382d41b8af","original_commit_id":"1a638ced031b561e408fa62a2ca811382d41b8af","user":{"login":"des-des","id":12845233,"avatar_url":"https://avatars1.githubusercontent.com/u/12845233?v=4","gravatar_id":"","url":"https://api.github.com/users/des-des","html_url":"https://github.com/des-des","followers_url":"https://api.github.com/users/des-des/followers","following_url":"https://api.github.com/users/des-des/following{/other_user}","gists_url":"https://api.github.com/users/des-des/gists{/gist_id}","starred_url":"https://api.github.com/users/des-des/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/des-des/subscriptions","organizations_url":"https://api.github.com/users/des-des/orgs","repos_url":"https://api.github.com/users/des-des/repos","events_url":"https://api.github.com/users/des-des/events{/privacy}","received_events_url":"https://api.github.com/users/des-des/received_events","type":"User","site_admin":false},"body":"Okay, these conditions are weird\r\n```js\r\nif (!newUser && !teacher && !host) {\r\n    isLoading\r\n}\r\n```\r\nCan you\r\n  1. Un-nest these if statements\r\n  2. See if there is a better bool in state to represent isLoading","created_at":"2018-03-11T09:02:25Z","updated_at":"2018-03-11T09:05:36Z","html_url":"https://github.com/airbaseuk/airbase/pull/66#discussion_r173647833","pull_request_url":"https://api.github.com/repos/airbaseuk/airbase/pulls/66","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/comments/173647833"},"html":{"href":"https://github.com/airbaseuk/airbase/pull/66#discussion_r173647833"},"pull_request":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/airbaseuk/airbase/pulls/66","id":173724108,"html_url":"https://github.com/airbaseuk/airbase/pull/66","diff_url":"https://github.com/airbaseuk/airbase/pull/66.diff","patch_url":"https://github.com/airbaseuk/airbase/pull/66.patch","issue_url":"https://api.github.com/repos/airbaseuk/airbase/issues/66","number":66,"state":"open","locked":false,"title":"Signup flow front","user":{"login":"SamerElaila","id":19314445,"avatar_url":"https://avatars1.githubusercontent.com/u/19314445?v=4","gravatar_id":"","url":"https://api.github.com/users/SamerElaila","html_url":"https://github.com/SamerElaila","followers_url":"https://api.github.com/users/SamerElaila/followers","following_url":"https://api.github.com/users/SamerElaila/following{/other_user}","gists_url":"https://api.github.com/users/SamerElaila/gists{/gist_id}","starred_url":"https://api.github.com/users/SamerElaila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamerElaila/subscriptions","organizations_url":"https://api.github.com/users/SamerElaila/orgs","repos_url":"https://api.github.com/users/SamerElaila/repos","events_url":"https://api.github.com/users/SamerElaila/events{/privacy}","received_events_url":"https://api.github.com/users/SamerElaila/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-08T12:32:19Z","updated_at":"2018-03-11T09:05:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78748a0f9b64a3ecf14ded37bd3486ae96eb8595","assignee":{"login":"des-des","id":12845233,"avatar_url":"https://avatars1.githubusercontent.com/u/12845233?v=4","gravatar_id":"","url":"https://api.github.com/users/des-des","html_url":"https://github.com/des-des","followers_url":"https://api.github.com/users/des-des/followers","following_url":"https://api.github.com/users/des-des/following{/other_user}","gists_url":"https://api.github.com/users/des-des/gists{/gist_id}","starred_url":"https://api.github.com/users/des-des/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/des-des/subscriptions","organizations_url":"https://api.github.com/users/des-des/orgs","repos_url":"https://api.github.com/users/des-des/repos","events_url":"https://api.github.com/users/des-des/events{/privacy}","received_events_url":"https://api.github.com/users/des-des/received_events","type":"User","site_admin":false},"assignees":[{"login":"des-des","id":12845233,"avatar_url":"https://avatars1.githubusercontent.com/u/12845233?v=4","gravatar_id":"","url":"https://api.github.com/users/des-des","html_url":"https://github.com/des-des","followers_url":"https://api.github.com/users/des-des/followers","following_url":"https://api.github.com/users/des-des/following{/other_user}","gists_url":"https://api.github.com/users/des-des/gists{/gist_id}","starred_url":"https://api.github.com/users/des-des/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/des-des/subscriptions","organizations_url":"https://api.github.com/users/des-des/orgs","repos_url":"https://api.github.com/users/des-des/repos","events_url":"https://api.github.com/users/des-des/events{/privacy}","received_events_url":"https://api.github.com/users/des-des/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbaseuk/airbase/pulls/66/commits","review_comments_url":"https://api.github.com/repos/airbaseuk/airbase/pulls/66/comments","review_comment_url":"https://api.github.com/repos/airbaseuk/airbase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbaseuk/airbase/issues/66/comments","statuses_url":"https://api.github.com/repos/airbaseuk/airbase/statuses/1a638ced031b561e408fa62a2ca811382d41b8af","head":{"label":"airbaseuk:signup-flow-front","ref":"signup-flow-front","sha":"1a638ced031b561e408fa62a2ca811382d41b8af","user":{"login":"airbaseuk","id":35890133,"avatar_url":"https://avatars3.githubusercontent.com/u/35890133?v=4","gravatar_id":"","url":"https://api.github.com/users/airbaseuk","html_url":"https://github.com/airbaseuk","followers_url":"https://api.github.com/users/airbaseuk/followers","following_url":"https://api.github.com/users/airbaseuk/following{/other_user}","gists_url":"https://api.github.com/users/airbaseuk/gists{/gist_id}","starred_url":"https://api.github.com/users/airbaseuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbaseuk/subscriptions","organizations_url":"https://api.github.com/users/airbaseuk/orgs","repos_url":"https://api.github.com/users/airbaseuk/repos","events_url":"https://api.github.com/users/airbaseuk/events{/privacy}","received_events_url":"https://api.github.com/users/airbaseuk/received_events","type":"Organization","site_admin":false},"repo":{"id":119248933,"name":"airbase","full_name":"airbaseuk/airbase","owner":{"login":"airbaseuk","id":35890133,"avatar_url":"https://avatars3.githubusercontent.com/u/35890133?v=4","gravatar_id":"","url":"https://api.github.com/users/airbaseuk","html_url":"https://github.com/airbaseuk","followers_url":"https://api.github.com/users/airbaseuk/followers","following_url":"https://api.github.com/users/airbaseuk/following{/other_user}","gists_url":"https://api.github.com/users/airbaseuk/gists{/gist_id}","starred_url":"https://api.github.com/users/airbaseuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbaseuk/subscriptions","organizations_url":"https://api.github.com/users/airbaseuk/orgs","repos_url":"https://api.github.com/users/airbaseuk/repos","events_url":"https://api.github.com/users/airbaseuk/events{/privacy}","received_events_url":"https://api.github.com/users/airbaseuk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbaseuk/airbase","description":"Heroku Link","fork":false,"url":"https://api.github.com/repos/airbaseuk/airbase","forks_url":"https://api.github.com/repos/airbaseuk/airbase/forks","keys_url":"https://api.github.com/repos/airbaseuk/airbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbaseuk/airbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbaseuk/airbase/teams","hooks_url":"https://api.github.com/repos/airbaseuk/airbase/hooks","issue_events_url":"https://api.github.com/repos/airbaseuk/airbase/issues/events{/number}","events_url":"https://api.github.com/repos/airbaseuk/airbase/events","assignees_url":"https://api.github.com/repos/airbaseuk/airbase/assignees{/user}","branches_url":"https://api.github.com/repos/airbaseuk/airbase/branches{/branch}","tags_url":"https://api.github.com/repos/airbaseuk/airbase/tags","blobs_url":"https://api.github.com/repos/airbaseuk/airbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbaseuk/airbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbaseuk/airbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbaseuk/airbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbaseuk/airbase/statuses/{sha}","languages_url":"https://api.github.com/repos/airbaseuk/airbase/languages","stargazers_url":"https://api.github.com/repos/airbaseuk/airbase/stargazers","contributors_url":"https://api.github.com/repos/airbaseuk/airbase/contributors","subscribers_url":"https://api.github.com/repos/airbaseuk/airbase/subscribers","subscription_url":"https://api.github.com/repos/airbaseuk/airbase/subscription","commits_url":"https://api.github.com/repos/airbaseuk/airbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbaseuk/airbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbaseuk/airbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbaseuk/airbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbaseuk/airbase/contents/{+path}","compare_url":"https://api.github.com/repos/airbaseuk/airbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbaseuk/airbase/merges","archive_url":"https://api.github.com/repos/airbaseuk/airbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbaseuk/airbase/downloads","issues_url":"https://api.github.com/repos/airbaseuk/airbase/issues{/number}","pulls_url":"https://api.github.com/repos/airbaseuk/airbase/pulls{/number}","milestones_url":"https://api.github.com/repos/airbaseuk/airbase/milestones{/number}","notifications_url":"https://api.github.com/repos/airbaseuk/airbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbaseuk/airbase/labels{/name}","releases_url":"https://api.github.com/repos/airbaseuk/airbase/releases{/id}","deployments_url":"https://api.github.com/repos/airbaseuk/airbase/deployments","created_at":"2018-01-28T10:38:02Z","updated_at":"2018-02-27T08:48:31Z","pushed_at":"2018-03-10T11:53:40Z","git_url":"git://github.com/airbaseuk/airbase.git","ssh_url":"git@github.com:airbaseuk/airbase.git","clone_url":"https://github.com/airbaseuk/airbase.git","svn_url":"https://github.com/airbaseuk/airbase","homepage":"https://airbaseuk.herokuapp.com/","size":580,"stargazers_count":1,"watchers_count":1,"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":13,"license":null,"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"base":{"label":"airbaseuk:master","ref":"master","sha":"57d14f69f01ee338cbc760a71067aaf56e56b8ac","user":{"login":"airbaseuk","id":35890133,"avatar_url":"https://avatars3.githubusercontent.com/u/35890133?v=4","gravatar_id":"","url":"https://api.github.com/users/airbaseuk","html_url":"https://github.com/airbaseuk","followers_url":"https://api.github.com/users/airbaseuk/followers","following_url":"https://api.github.com/users/airbaseuk/following{/other_user}","gists_url":"https://api.github.com/users/airbaseuk/gists{/gist_id}","starred_url":"https://api.github.com/users/airbaseuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbaseuk/subscriptions","organizations_url":"https://api.github.com/users/airbaseuk/orgs","repos_url":"https://api.github.com/users/airbaseuk/repos","events_url":"https://api.github.com/users/airbaseuk/events{/privacy}","received_events_url":"https://api.github.com/users/airbaseuk/received_events","type":"Organization","site_admin":false},"repo":{"id":119248933,"name":"airbase","full_name":"airbaseuk/airbase","owner":{"login":"airbaseuk","id":35890133,"avatar_url":"https://avatars3.githubusercontent.com/u/35890133?v=4","gravatar_id":"","url":"https://api.github.com/users/airbaseuk","html_url":"https://github.com/airbaseuk","followers_url":"https://api.github.com/users/airbaseuk/followers","following_url":"https://api.github.com/users/airbaseuk/following{/other_user}","gists_url":"https://api.github.com/users/airbaseuk/gists{/gist_id}","starred_url":"https://api.github.com/users/airbaseuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbaseuk/subscriptions","organizations_url":"https://api.github.com/users/airbaseuk/orgs","repos_url":"https://api.github.com/users/airbaseuk/repos","events_url":"https://api.github.com/users/airbaseuk/events{/privacy}","received_events_url":"https://api.github.com/users/airbaseuk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbaseuk/airbase","description":"Heroku Link","fork":false,"url":"https://api.github.com/repos/airbaseuk/airbase","forks_url":"https://api.github.com/repos/airbaseuk/airbase/forks","keys_url":"https://api.github.com/repos/airbaseuk/airbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbaseuk/airbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbaseuk/airbase/teams","hooks_url":"https://api.github.com/repos/airbaseuk/airbase/hooks","issue_events_url":"https://api.github.com/repos/airbaseuk/airbase/issues/events{/number}","events_url":"https://api.github.com/repos/airbaseuk/airbase/events","assignees_url":"https://api.github.com/repos/airbaseuk/airbase/assignees{/user}","branches_url":"https://api.github.com/repos/airbaseuk/airbase/branches{/branch}","tags_url":"https://api.github.com/repos/airbaseuk/airbase/tags","blobs_url":"https://api.github.com/repos/airbaseuk/airbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbaseuk/airbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbaseuk/airbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbaseuk/airbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbaseuk/airbase/statuses/{sha}","languages_url":"https://api.github.com/repos/airbaseuk/airbase/languages","stargazers_url":"https://api.github.com/repos/airbaseuk/airbase/stargazers","contributors_url":"https://api.github.com/repos/airbaseuk/airbase/contributors","subscribers_url":"https://api.github.com/repos/airbaseuk/airbase/subscribers","subscription_url":"https://api.github.com/repos/airbaseuk/airbase/subscription","commits_url":"https://api.github.com/repos/airbaseuk/airbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbaseuk/airbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbaseuk/airbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbaseuk/airbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbaseuk/airbase/contents/{+path}","compare_url":"https://api.github.com/repos/airbaseuk/airbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbaseuk/airbase/merges","archive_url":"https://api.github.com/repos/airbaseuk/airbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbaseuk/airbase/downloads","issues_url":"https://api.github.com/repos/airbaseuk/airbase/issues{/number}","pulls_url":"https://api.github.com/repos/airbaseuk/airbase/pulls{/number}","milestones_url":"https://api.github.com/repos/airbaseuk/airbase/milestones{/number}","notifications_url":"https://api.github.com/repos/airbaseuk/airbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbaseuk/airbase/labels{/name}","releases_url":"https://api.github.com/repos/airbaseuk/airbase/releases{/id}","deployments_url":"https://api.github.com/repos/airbaseuk/airbase/deployments","created_at":"2018-01-28T10:38:02Z","updated_at":"2018-02-27T08:48:31Z","pushed_at":"2018-03-10T11:53:40Z","git_url":"git://github.com/airbaseuk/airbase.git","ssh_url":"git@github.com:airbaseuk/airbase.git","clone_url":"https://github.com/airbaseuk/airbase.git","svn_url":"https://github.com/airbaseuk/airbase","homepage":"https://airbaseuk.herokuapp.com/","size":580,"stargazers_count":1,"watchers_count":1,"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":13,"license":null,"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/66"},"html":{"href":"https://github.com/airbaseuk/airbase/pull/66"},"issue":{"href":"https://api.github.com/repos/airbaseuk/airbase/issues/66"},"comments":{"href":"https://api.github.com/repos/airbaseuk/airbase/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbaseuk/airbase/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/airbaseuk/airbase/statuses/1a638ced031b561e408fa62a2ca811382d41b8af"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"des-des"}}