{"action":"created","comment":{"url":"https://api.github.com/repos/andela/activo-web/pulls/comments/192797398","pull_request_review_id":125641097,"id":192797398,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mjc5NzM5OA==","diff_hunk":"@@ -0,0 +1,13 @@\n+// react libraries\n+import * as React from 'react';\n+import { Redirect, Route } from 'react-router-dom';\n+\n+// helper functions\n+import { authService } from '../../utils/auth';\n+\n+const AuthenticatedRoute = ({ component: Component, ...rest }) => ((\n+  <Route {...rest}\n+    render={props => authService.isAuthenticated() ? (<Component {...props} />) : <Redirect to=\"/\" /> } />","path":"src/components/AuthenticatedRoute/index.tsx","position":10,"original_position":10,"commit_id":"9d89baf5dbd6783a61ca8962de070dc44e0f3b1a","original_commit_id":"9d89baf5dbd6783a61ca8962de070dc44e0f3b1a","user":{"login":"andela-kakpobome","id":20772189,"node_id":"MDQ6VXNlcjIwNzcyMTg5","avatar_url":"https://avatars2.githubusercontent.com/u/20772189?v=4","gravatar_id":"","url":"https://api.github.com/users/andela-kakpobome","html_url":"https://github.com/andela-kakpobome","followers_url":"https://api.github.com/users/andela-kakpobome/followers","following_url":"https://api.github.com/users/andela-kakpobome/following{/other_user}","gists_url":"https://api.github.com/users/andela-kakpobome/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-kakpobome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-kakpobome/subscriptions","organizations_url":"https://api.github.com/users/andela-kakpobome/orgs","repos_url":"https://api.github.com/users/andela-kakpobome/repos","events_url":"https://api.github.com/users/andela-kakpobome/events{/privacy}","received_events_url":"https://api.github.com/users/andela-kakpobome/received_events","type":"User","site_admin":false},"body":"1. Space the `{...props}` to be `{ ...props }`\r\n2. Where's the type `Component` from? I presumed this would have been something of this sort instead: `component: React.Component`\r\n3. Why does `(<Component {...props} />` have parathensis around and Redirect does not?","created_at":"2018-06-04T16:10:24Z","updated_at":"2018-06-04T16:13:54Z","html_url":"https://github.com/andela/activo-web/pull/19#discussion_r192797398","pull_request_url":"https://api.github.com/repos/andela/activo-web/pulls/19","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/andela/activo-web/pulls/comments/192797398"},"html":{"href":"https://github.com/andela/activo-web/pull/19#discussion_r192797398"},"pull_request":{"href":"https://api.github.com/repos/andela/activo-web/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/andela/activo-web/pulls/19","id":192446418,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNDQ2NDE4","html_url":"https://github.com/andela/activo-web/pull/19","diff_url":"https://github.com/andela/activo-web/pull/19.diff","patch_url":"https://github.com/andela/activo-web/pull/19.patch","issue_url":"https://api.github.com/repos/andela/activo-web/issues/19","number":19,"state":"open","locked":false,"title":"#157469101 Redirect unauthenticated users to auth page","user":{"login":"bahdcoder","id":19477966,"node_id":"MDQ6VXNlcjE5NDc3OTY2","avatar_url":"https://avatars2.githubusercontent.com/u/19477966?v=4","gravatar_id":"","url":"https://api.github.com/users/bahdcoder","html_url":"https://github.com/bahdcoder","followers_url":"https://api.github.com/users/bahdcoder/followers","following_url":"https://api.github.com/users/bahdcoder/following{/other_user}","gists_url":"https://api.github.com/users/bahdcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/bahdcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahdcoder/subscriptions","organizations_url":"https://api.github.com/users/bahdcoder/orgs","repos_url":"https://api.github.com/users/bahdcoder/repos","events_url":"https://api.github.com/users/bahdcoder/events{/privacy}","received_events_url":"https://api.github.com/users/bahdcoder/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nRedirect unauthenticated users to auth page\r\n\r\n#### Description of Task to be completed?\r\n     - add AuthenticatedRoute component\r\n     - redirect user to / route if user is not authenticated\r\n     - mount Dashboard page with AuthenticatedRoute component\r\n     - Update tslint.json file with variable-name rule\r\n\r\n#### How should this be manually tested?\r\nTry visit the /dashboard page without logging in .\r\n\r\n#### Any background context you want to provide?\r\nNone\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n[#157469101](https://www.pivotaltracker.com/story/show/157469101)\r\n\r\n#### Questions:\r\nNone\r\n","created_at":"2018-06-04T15:29:54Z","updated_at":"2018-06-04T16:13:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"107ef6a07cb0acdddb989ef8f071bb8da0916bca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/activo-web/pulls/19/commits","review_comments_url":"https://api.github.com/repos/andela/activo-web/pulls/19/comments","review_comment_url":"https://api.github.com/repos/andela/activo-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/activo-web/issues/19/comments","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/9d89baf5dbd6783a61ca8962de070dc44e0f3b1a","head":{"label":"andela:ft-redirect-unauthenticated-users-157469101","ref":"ft-redirect-unauthenticated-users-157469101","sha":"9d89baf5dbd6783a61ca8962de070dc44e0f3b1a","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":132578458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI1Nzg0NTg=","name":"activo-web","full_name":"andela/activo-web","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/activo-web","description":null,"fork":false,"url":"https://api.github.com/repos/andela/activo-web","forks_url":"https://api.github.com/repos/andela/activo-web/forks","keys_url":"https://api.github.com/repos/andela/activo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/activo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/activo-web/teams","hooks_url":"https://api.github.com/repos/andela/activo-web/hooks","issue_events_url":"https://api.github.com/repos/andela/activo-web/issues/events{/number}","events_url":"https://api.github.com/repos/andela/activo-web/events","assignees_url":"https://api.github.com/repos/andela/activo-web/assignees{/user}","branches_url":"https://api.github.com/repos/andela/activo-web/branches{/branch}","tags_url":"https://api.github.com/repos/andela/activo-web/tags","blobs_url":"https://api.github.com/repos/andela/activo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/activo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/activo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/activo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/activo-web/languages","stargazers_url":"https://api.github.com/repos/andela/activo-web/stargazers","contributors_url":"https://api.github.com/repos/andela/activo-web/contributors","subscribers_url":"https://api.github.com/repos/andela/activo-web/subscribers","subscription_url":"https://api.github.com/repos/andela/activo-web/subscription","commits_url":"https://api.github.com/repos/andela/activo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/activo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/activo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/activo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/activo-web/contents/{+path}","compare_url":"https://api.github.com/repos/andela/activo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/activo-web/merges","archive_url":"https://api.github.com/repos/andela/activo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/activo-web/downloads","issues_url":"https://api.github.com/repos/andela/activo-web/issues{/number}","pulls_url":"https://api.github.com/repos/andela/activo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/activo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/activo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/activo-web/labels{/name}","releases_url":"https://api.github.com/repos/andela/activo-web/releases{/id}","deployments_url":"https://api.github.com/repos/andela/activo-web/deployments","created_at":"2018-05-08T08:28:37Z","updated_at":"2018-06-04T13:33:10Z","pushed_at":"2018-06-04T15:34:18Z","git_url":"git://github.com/andela/activo-web.git","ssh_url":"git@github.com:andela/activo-web.git","clone_url":"https://github.com/andela/activo-web.git","svn_url":"https://github.com/andela/activo-web","homepage":null,"size":2697,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"34ce584dd6f44712096f3cb942b876bb3b382ca9","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":132578458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI1Nzg0NTg=","name":"activo-web","full_name":"andela/activo-web","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/activo-web","description":null,"fork":false,"url":"https://api.github.com/repos/andela/activo-web","forks_url":"https://api.github.com/repos/andela/activo-web/forks","keys_url":"https://api.github.com/repos/andela/activo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/activo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/activo-web/teams","hooks_url":"https://api.github.com/repos/andela/activo-web/hooks","issue_events_url":"https://api.github.com/repos/andela/activo-web/issues/events{/number}","events_url":"https://api.github.com/repos/andela/activo-web/events","assignees_url":"https://api.github.com/repos/andela/activo-web/assignees{/user}","branches_url":"https://api.github.com/repos/andela/activo-web/branches{/branch}","tags_url":"https://api.github.com/repos/andela/activo-web/tags","blobs_url":"https://api.github.com/repos/andela/activo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/activo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/activo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/activo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/activo-web/languages","stargazers_url":"https://api.github.com/repos/andela/activo-web/stargazers","contributors_url":"https://api.github.com/repos/andela/activo-web/contributors","subscribers_url":"https://api.github.com/repos/andela/activo-web/subscribers","subscription_url":"https://api.github.com/repos/andela/activo-web/subscription","commits_url":"https://api.github.com/repos/andela/activo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/activo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/activo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/activo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/activo-web/contents/{+path}","compare_url":"https://api.github.com/repos/andela/activo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/activo-web/merges","archive_url":"https://api.github.com/repos/andela/activo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/activo-web/downloads","issues_url":"https://api.github.com/repos/andela/activo-web/issues{/number}","pulls_url":"https://api.github.com/repos/andela/activo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/activo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/activo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/activo-web/labels{/name}","releases_url":"https://api.github.com/repos/andela/activo-web/releases{/id}","deployments_url":"https://api.github.com/repos/andela/activo-web/deployments","created_at":"2018-05-08T08:28:37Z","updated_at":"2018-06-04T13:33:10Z","pushed_at":"2018-06-04T15:34:18Z","git_url":"git://github.com/andela/activo-web.git","ssh_url":"git@github.com:andela/activo-web.git","clone_url":"https://github.com/andela/activo-web.git","svn_url":"https://github.com/andela/activo-web","homepage":null,"size":2697,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/activo-web/pulls/19"},"html":{"href":"https://github.com/andela/activo-web/pull/19"},"issue":{"href":"https://api.github.com/repos/andela/activo-web/issues/19"},"comments":{"href":"https://api.github.com/repos/andela/activo-web/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/activo-web/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/activo-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/activo-web/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/andela/activo-web/statuses/9d89baf5dbd6783a61ca8962de070dc44e0f3b1a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andela-kakpobome"}}