{"action":"created","comment":{"url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/comments/70891919","id":70891919,"diff_hunk":"@@ -0,0 +1,68 @@\n+import React from 'react';\n+import { browserHistory } from 'react-router';\n+import FalcorController from \"lib/falcor/FalcorController\";\n+import { setAppReady } from \"lib/falcor/falcorUtils\";\n+\n+export default class AppController extends FalcorController {\n+  constructor(props) {\n+    super(props);\n+    this.safeSetState({\n+      defaultValue: this.handleDefaultValue.bind(this)()\n+    })\n+    \n+  }\n+  static getFalcorPath() {\n+    return;\n+  }\n+\n+  componentDidMount() {\n+    super.componentDidMount();\n+    setAppReady();\n+  }\n+\n+  handleDefaultValue() {\n+    let path = this.props.location.pathname;\n+    if (path === '/') {\n+      return '/';\n+    }\n+    else if (path[2] === 'r') {\n+      return 'articles';\n+    }\n+    else {\n+      return 'authors';\n+    }\n+  }\n+\n+  handleChange(event) {\n+    if (event.target.value === '/') {\n+      browserHistory.push(\"/\");","path":"src/components/editor/AppController.jsx","position":38,"original_position":38,"commit_id":"cd3df8271a1301dd380cbce86fc65f61794aa5fd","original_commit_id":"c2e212ccdef38ef2903c55c95285b2945dd7d25c","user":{"login":"lingz","id":3147213,"avatar_url":"https://avatars.githubusercontent.com/u/3147213?v=3","gravatar_id":"","url":"https://api.github.com/users/lingz","html_url":"https://github.com/lingz","followers_url":"https://api.github.com/users/lingz/followers","following_url":"https://api.github.com/users/lingz/following{/other_user}","gists_url":"https://api.github.com/users/lingz/gists{/gist_id}","starred_url":"https://api.github.com/users/lingz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lingz/subscriptions","organizations_url":"https://api.github.com/users/lingz/orgs","repos_url":"https://api.github.com/users/lingz/repos","events_url":"https://api.github.com/users/lingz/events{/privacy}","received_events_url":"https://api.github.com/users/lingz/received_events","type":"User","site_admin":false},"body":"I think the easier way here would be to use two <Link> and just disable one if you are already on that page. \r\n\r\nWhat's the difference between / and /authors and /articles? ","created_at":"2016-07-14T21:57:09Z","updated_at":"2016-07-14T21:57:09Z","html_url":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9#discussion_r70891919","pull_request_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/comments/70891919"},"html":{"href":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9#discussion_r70891919"},"pull_request":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9","id":77442677,"html_url":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9","diff_url":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9.diff","patch_url":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9.patch","issue_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/9","number":9,"state":"open","locked":false,"title":"Editor tools","user":{"login":"Goldsmith94","id":18149242,"avatar_url":"https://avatars.githubusercontent.com/u/18149242?v=3","gravatar_id":"","url":"https://api.github.com/users/Goldsmith94","html_url":"https://github.com/Goldsmith94","followers_url":"https://api.github.com/users/Goldsmith94/followers","following_url":"https://api.github.com/users/Goldsmith94/following{/other_user}","gists_url":"https://api.github.com/users/Goldsmith94/gists{/gist_id}","starred_url":"https://api.github.com/users/Goldsmith94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Goldsmith94/subscriptions","organizations_url":"https://api.github.com/users/Goldsmith94/orgs","repos_url":"https://api.github.com/users/Goldsmith94/repos","events_url":"https://api.github.com/users/Goldsmith94/events{/privacy}","received_events_url":"https://api.github.com/users/Goldsmith94/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-14T11:46:22Z","updated_at":"2016-07-14T21:57:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ca452055111fa9dc64a0ce4ef954be87fd9c002","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9/commits","review_comments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9/comments","review_comment_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/9/comments","statuses_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/statuses/cd3df8271a1301dd380cbce86fc65f61794aa5fd","head":{"label":"thegazelle-ad:editor-tools","ref":"editor-tools","sha":"cd3df8271a1301dd380cbce86fc65f61794aa5fd","user":{"login":"thegazelle-ad","id":8604956,"avatar_url":"https://avatars.githubusercontent.com/u/8604956?v=3","gravatar_id":"","url":"https://api.github.com/users/thegazelle-ad","html_url":"https://github.com/thegazelle-ad","followers_url":"https://api.github.com/users/thegazelle-ad/followers","following_url":"https://api.github.com/users/thegazelle-ad/following{/other_user}","gists_url":"https://api.github.com/users/thegazelle-ad/gists{/gist_id}","starred_url":"https://api.github.com/users/thegazelle-ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegazelle-ad/subscriptions","organizations_url":"https://api.github.com/users/thegazelle-ad/orgs","repos_url":"https://api.github.com/users/thegazelle-ad/repos","events_url":"https://api.github.com/users/thegazelle-ad/events{/privacy}","received_events_url":"https://api.github.com/users/thegazelle-ad/received_events","type":"Organization","site_admin":false},"repo":{"id":60618027,"name":"gazelle-front-end","full_name":"thegazelle-ad/gazelle-front-end","owner":{"login":"thegazelle-ad","id":8604956,"avatar_url":"https://avatars.githubusercontent.com/u/8604956?v=3","gravatar_id":"","url":"https://api.github.com/users/thegazelle-ad","html_url":"https://github.com/thegazelle-ad","followers_url":"https://api.github.com/users/thegazelle-ad/followers","following_url":"https://api.github.com/users/thegazelle-ad/following{/other_user}","gists_url":"https://api.github.com/users/thegazelle-ad/gists{/gist_id}","starred_url":"https://api.github.com/users/thegazelle-ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegazelle-ad/subscriptions","organizations_url":"https://api.github.com/users/thegazelle-ad/orgs","repos_url":"https://api.github.com/users/thegazelle-ad/repos","events_url":"https://api.github.com/users/thegazelle-ad/events{/privacy}","received_events_url":"https://api.github.com/users/thegazelle-ad/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thegazelle-ad/gazelle-front-end","description":"Front end server for the Gazelle","fork":false,"url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end","forks_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/forks","keys_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/teams","hooks_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/hooks","issue_events_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/events{/number}","events_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/events","assignees_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/assignees{/user}","branches_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/branches{/branch}","tags_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/tags","blobs_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/refs{/sha}","trees_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/statuses/{sha}","languages_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/languages","stargazers_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/stargazers","contributors_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/contributors","subscribers_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/subscribers","subscription_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/subscription","commits_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/commits{/sha}","git_commits_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/commits{/sha}","comments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/comments{/number}","issue_comment_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/comments{/number}","contents_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/contents/{+path}","compare_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/merges","archive_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/downloads","issues_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues{/number}","pulls_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls{/number}","milestones_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/milestones{/number}","notifications_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/labels{/name}","releases_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/releases{/id}","deployments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/deployments","created_at":"2016-06-07T14:04:28Z","updated_at":"2016-06-07T14:04:50Z","pushed_at":"2016-07-14T12:05:11Z","git_url":"git://github.com/thegazelle-ad/gazelle-front-end.git","ssh_url":"git@github.com:thegazelle-ad/gazelle-front-end.git","clone_url":"https://github.com/thegazelle-ad/gazelle-front-end.git","svn_url":"https://github.com/thegazelle-ad/gazelle-front-end","homepage":null,"size":941,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"thegazelle-ad:master","ref":"master","sha":"b2ea8b147d7e614332de536b9779ccbbecb9f63c","user":{"login":"thegazelle-ad","id":8604956,"avatar_url":"https://avatars.githubusercontent.com/u/8604956?v=3","gravatar_id":"","url":"https://api.github.com/users/thegazelle-ad","html_url":"https://github.com/thegazelle-ad","followers_url":"https://api.github.com/users/thegazelle-ad/followers","following_url":"https://api.github.com/users/thegazelle-ad/following{/other_user}","gists_url":"https://api.github.com/users/thegazelle-ad/gists{/gist_id}","starred_url":"https://api.github.com/users/thegazelle-ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegazelle-ad/subscriptions","organizations_url":"https://api.github.com/users/thegazelle-ad/orgs","repos_url":"https://api.github.com/users/thegazelle-ad/repos","events_url":"https://api.github.com/users/thegazelle-ad/events{/privacy}","received_events_url":"https://api.github.com/users/thegazelle-ad/received_events","type":"Organization","site_admin":false},"repo":{"id":60618027,"name":"gazelle-front-end","full_name":"thegazelle-ad/gazelle-front-end","owner":{"login":"thegazelle-ad","id":8604956,"avatar_url":"https://avatars.githubusercontent.com/u/8604956?v=3","gravatar_id":"","url":"https://api.github.com/users/thegazelle-ad","html_url":"https://github.com/thegazelle-ad","followers_url":"https://api.github.com/users/thegazelle-ad/followers","following_url":"https://api.github.com/users/thegazelle-ad/following{/other_user}","gists_url":"https://api.github.com/users/thegazelle-ad/gists{/gist_id}","starred_url":"https://api.github.com/users/thegazelle-ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegazelle-ad/subscriptions","organizations_url":"https://api.github.com/users/thegazelle-ad/orgs","repos_url":"https://api.github.com/users/thegazelle-ad/repos","events_url":"https://api.github.com/users/thegazelle-ad/events{/privacy}","received_events_url":"https://api.github.com/users/thegazelle-ad/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thegazelle-ad/gazelle-front-end","description":"Front end server for the Gazelle","fork":false,"url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end","forks_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/forks","keys_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/teams","hooks_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/hooks","issue_events_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/events{/number}","events_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/events","assignees_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/assignees{/user}","branches_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/branches{/branch}","tags_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/tags","blobs_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/refs{/sha}","trees_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/statuses/{sha}","languages_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/languages","stargazers_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/stargazers","contributors_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/contributors","subscribers_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/subscribers","subscription_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/subscription","commits_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/commits{/sha}","git_commits_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/git/commits{/sha}","comments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/comments{/number}","issue_comment_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/comments{/number}","contents_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/contents/{+path}","compare_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/merges","archive_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/downloads","issues_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues{/number}","pulls_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls{/number}","milestones_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/milestones{/number}","notifications_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/labels{/name}","releases_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/releases{/id}","deployments_url":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/deployments","created_at":"2016-06-07T14:04:28Z","updated_at":"2016-06-07T14:04:50Z","pushed_at":"2016-07-14T12:05:11Z","git_url":"git://github.com/thegazelle-ad/gazelle-front-end.git","ssh_url":"git@github.com:thegazelle-ad/gazelle-front-end.git","clone_url":"https://github.com/thegazelle-ad/gazelle-front-end.git","svn_url":"https://github.com/thegazelle-ad/gazelle-front-end","homepage":null,"size":941,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9"},"html":{"href":"https://github.com/thegazelle-ad/gazelle-front-end/pull/9"},"issue":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/9"},"comments":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/thegazelle-ad/gazelle-front-end/statuses/cd3df8271a1301dd380cbce86fc65f61794aa5fd"}}}}
{"actor":{"display_login":"lingz"}}