{"action":"created","comment":{"url":"https://api.github.com/repos/HackYourFuture/React/pulls/comments/236052494","pull_request_review_id":178061057,"id":236052494,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjA1MjQ5NA==","diff_hunk":"@@ -0,0 +1,90 @@\n+import { observable, computed, action } from \"mobx\";\n+import Data from \"../Data.json\";\n+import { configure } from \"mobx\";\n+configure({ enforceActions: true });\n+\n+class TodosStore {\n+  @observable\n+  edit = false;\n+  @observable\n+  Data = Data;\n+\n+  @action\n+  handleCheck = todoId => {\n+    const newData = this.Data.map(todo => {\n+      if (todo.id === todoId) {\n+        return { ...todo, done: !todo.done };\n+      }\n+      return todo;\n+    });\n+    this.Data = newData;\n+  };\n+  @action\n+  handleDelete = todoId => {\n+    const filteredTodos = this.Data.filter(todo => {\n+      return todo.id !== todoId;\n+    });\n+\n+    this.Data.replace(filteredTodos);\n+  };\n+  @action\n+  handleAddTodo = (description, deadline) => {\n+    const id = Math.max(...this.Data.map(todo => todo.id), 0) + 1;\n+\n+    const newTodo = {\n+      id,\n+      description,\n+      deadline,\n+      done: false\n+    };\n+\n+    this.Data = [...this.Data, newTodo];\n+  };\n+  @action\n+  handleEdit = id => {\n+    this.Data.map(todo => {\n+      if (todo.id === id) {\n+        todo.edit = !this.edit;\n+      }\n+\n+      return todo;\n+    });\n+  };\n+  @action\n+  cancelEdit = id => {\n+    this.Data.map(todo => {\n+      if (todo.id === id) {\n+        todo.edit = !todo.edit;\n+      }\n+\n+      return todo;\n+    });\n+  };\n+\n+  @action\n+  handleUpdate = (todoId, description, deadline) => {\n+    const newData = this.Data.map(todo => {\n+      if (todo.id === todoId) {\n+        return {\n+          ...todo,\n+          description: description || todo.description,\n+          deadline: deadline || todo.deadline\n+        };\n+      }\n+\n+      return todo;\n+    });\n+    this.Data = newData;\n+  };\n+\n+  @computed\n+  get remainingTodos() {\n+    const remaining = this.Data.filter(todo => {\n+      return todo.done !== true;","path":"homework-submission/week4-class16/src/stores/TodosStore.jsx","position":83,"original_position":83,"commit_id":"6ba5a495eb517ee0ae8c78a857555d90d69107b3","original_commit_id":"6ba5a495eb517ee0ae8c78a857555d90d69107b3","user":{"login":"AllouhM","id":37315397,"node_id":"MDQ6VXNlcjM3MzE1Mzk3","avatar_url":"https://avatars2.githubusercontent.com/u/37315397?v=4","gravatar_id":"","url":"https://api.github.com/users/AllouhM","html_url":"https://github.com/AllouhM","followers_url":"https://api.github.com/users/AllouhM/followers","following_url":"https://api.github.com/users/AllouhM/following{/other_user}","gists_url":"https://api.github.com/users/AllouhM/gists{/gist_id}","starred_url":"https://api.github.com/users/AllouhM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllouhM/subscriptions","organizations_url":"https://api.github.com/users/AllouhM/orgs","repos_url":"https://api.github.com/users/AllouhM/repos","events_url":"https://api.github.com/users/AllouhM/events{/privacy}","received_events_url":"https://api.github.com/users/AllouhM/received_events","type":"User","site_admin":false},"body":"amended in week 5 ","created_at":"2018-11-24T20:09:49Z","updated_at":"2018-11-24T20:09:49Z","html_url":"https://github.com/HackYourFuture/React/pull/279#discussion_r236052494","pull_request_url":"https://api.github.com/repos/HackYourFuture/React/pulls/279","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/comments/236052494"},"html":{"href":"https://github.com/HackYourFuture/React/pull/279#discussion_r236052494"},"pull_request":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/279"}},"in_reply_to_id":235912086},"pull_request":{"url":"https://api.github.com/repos/HackYourFuture/React/pulls/279","id":231012250,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDEyMjUw","html_url":"https://github.com/HackYourFuture/React/pull/279","diff_url":"https://github.com/HackYourFuture/React/pull/279.diff","patch_url":"https://github.com/HackYourFuture/React/pull/279.patch","issue_url":"https://api.github.com/repos/HackYourFuture/React/issues/279","number":279,"state":"open","locked":false,"title":"Class16 week4","user":{"login":"AllouhM","id":37315397,"node_id":"MDQ6VXNlcjM3MzE1Mzk3","avatar_url":"https://avatars2.githubusercontent.com/u/37315397?v=4","gravatar_id":"","url":"https://api.github.com/users/AllouhM","html_url":"https://github.com/AllouhM","followers_url":"https://api.github.com/users/AllouhM/followers","following_url":"https://api.github.com/users/AllouhM/following{/other_user}","gists_url":"https://api.github.com/users/AllouhM/gists{/gist_id}","starred_url":"https://api.github.com/users/AllouhM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllouhM/subscriptions","organizations_url":"https://api.github.com/users/AllouhM/orgs","repos_url":"https://api.github.com/users/AllouhM/repos","events_url":"https://api.github.com/users/AllouhM/events{/privacy}","received_events_url":"https://api.github.com/users/AllouhM/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-14T23:02:00Z","updated_at":"2018-11-24T20:09:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eefc503eb852d744d3e8c1c959ada2b628a63b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1113560282,"node_id":"MDU6TGFiZWwxMTEzNTYwMjgy","url":"https://api.github.com/repos/HackYourFuture/React/labels/class16","name":"class16","color":"2636e2","default":false},{"id":891096446,"node_id":"MDU6TGFiZWw4OTEwOTY0NDY=","url":"https://api.github.com/repos/HackYourFuture/React/labels/homework4","name":"homework4","color":"db39a5","default":false},{"id":891098247,"node_id":"MDU6TGFiZWw4OTEwOTgyNDc=","url":"https://api.github.com/repos/HackYourFuture/React/labels/reviewed","name":"reviewed","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HackYourFuture/React/pulls/279/commits","review_comments_url":"https://api.github.com/repos/HackYourFuture/React/pulls/279/comments","review_comment_url":"https://api.github.com/repos/HackYourFuture/React/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackYourFuture/React/issues/279/comments","statuses_url":"https://api.github.com/repos/HackYourFuture/React/statuses/6ba5a495eb517ee0ae8c78a857555d90d69107b3","head":{"label":"AllouhM:class16-week4","ref":"class16-week4","sha":"6ba5a495eb517ee0ae8c78a857555d90d69107b3","user":{"login":"AllouhM","id":37315397,"node_id":"MDQ6VXNlcjM3MzE1Mzk3","avatar_url":"https://avatars2.githubusercontent.com/u/37315397?v=4","gravatar_id":"","url":"https://api.github.com/users/AllouhM","html_url":"https://github.com/AllouhM","followers_url":"https://api.github.com/users/AllouhM/followers","following_url":"https://api.github.com/users/AllouhM/following{/other_user}","gists_url":"https://api.github.com/users/AllouhM/gists{/gist_id}","starred_url":"https://api.github.com/users/AllouhM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllouhM/subscriptions","organizations_url":"https://api.github.com/users/AllouhM/orgs","repos_url":"https://api.github.com/users/AllouhM/repos","events_url":"https://api.github.com/users/AllouhM/events{/privacy}","received_events_url":"https://api.github.com/users/AllouhM/received_events","type":"User","site_admin":false},"repo":{"id":143603476,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM2MDM0NzY=","name":"React","full_name":"AllouhM/React","private":false,"owner":{"login":"AllouhM","id":37315397,"node_id":"MDQ6VXNlcjM3MzE1Mzk3","avatar_url":"https://avatars2.githubusercontent.com/u/37315397?v=4","gravatar_id":"","url":"https://api.github.com/users/AllouhM","html_url":"https://github.com/AllouhM","followers_url":"https://api.github.com/users/AllouhM/followers","following_url":"https://api.github.com/users/AllouhM/following{/other_user}","gists_url":"https://api.github.com/users/AllouhM/gists{/gist_id}","starred_url":"https://api.github.com/users/AllouhM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllouhM/subscriptions","organizations_url":"https://api.github.com/users/AllouhM/orgs","repos_url":"https://api.github.com/users/AllouhM/repos","events_url":"https://api.github.com/users/AllouhM/events{/privacy}","received_events_url":"https://api.github.com/users/AllouhM/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AllouhM/React","description":"Specifications React Module","fork":true,"url":"https://api.github.com/repos/AllouhM/React","forks_url":"https://api.github.com/repos/AllouhM/React/forks","keys_url":"https://api.github.com/repos/AllouhM/React/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AllouhM/React/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AllouhM/React/teams","hooks_url":"https://api.github.com/repos/AllouhM/React/hooks","issue_events_url":"https://api.github.com/repos/AllouhM/React/issues/events{/number}","events_url":"https://api.github.com/repos/AllouhM/React/events","assignees_url":"https://api.github.com/repos/AllouhM/React/assignees{/user}","branches_url":"https://api.github.com/repos/AllouhM/React/branches{/branch}","tags_url":"https://api.github.com/repos/AllouhM/React/tags","blobs_url":"https://api.github.com/repos/AllouhM/React/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AllouhM/React/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AllouhM/React/git/refs{/sha}","trees_url":"https://api.github.com/repos/AllouhM/React/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AllouhM/React/statuses/{sha}","languages_url":"https://api.github.com/repos/AllouhM/React/languages","stargazers_url":"https://api.github.com/repos/AllouhM/React/stargazers","contributors_url":"https://api.github.com/repos/AllouhM/React/contributors","subscribers_url":"https://api.github.com/repos/AllouhM/React/subscribers","subscription_url":"https://api.github.com/repos/AllouhM/React/subscription","commits_url":"https://api.github.com/repos/AllouhM/React/commits{/sha}","git_commits_url":"https://api.github.com/repos/AllouhM/React/git/commits{/sha}","comments_url":"https://api.github.com/repos/AllouhM/React/comments{/number}","issue_comment_url":"https://api.github.com/repos/AllouhM/React/issues/comments{/number}","contents_url":"https://api.github.com/repos/AllouhM/React/contents/{+path}","compare_url":"https://api.github.com/repos/AllouhM/React/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AllouhM/React/merges","archive_url":"https://api.github.com/repos/AllouhM/React/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AllouhM/React/downloads","issues_url":"https://api.github.com/repos/AllouhM/React/issues{/number}","pulls_url":"https://api.github.com/repos/AllouhM/React/pulls{/number}","milestones_url":"https://api.github.com/repos/AllouhM/React/milestones{/number}","notifications_url":"https://api.github.com/repos/AllouhM/React/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AllouhM/React/labels{/name}","releases_url":"https://api.github.com/repos/AllouhM/React/releases{/id}","deployments_url":"https://api.github.com/repos/AllouhM/React/deployments","created_at":"2018-08-05T10:30:12Z","updated_at":"2018-08-05T10:30:14Z","pushed_at":"2018-11-18T11:42:58Z","git_url":"git://github.com/AllouhM/React.git","ssh_url":"git@github.com:AllouhM/React.git","clone_url":"https://github.com/AllouhM/React.git","svn_url":"https://github.com/AllouhM/React","homepage":null,"size":1249,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HackYourFuture:master","ref":"master","sha":"f7cb703da7d3c0f40d76540cddf00c4da44cfcb9","user":{"login":"HackYourFuture","id":20858568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODU4NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"repo":{"id":93503545,"node_id":"MDEwOlJlcG9zaXRvcnk5MzUwMzU0NQ==","name":"React","full_name":"HackYourFuture/React","private":false,"owner":{"login":"HackYourFuture","id":20858568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODU4NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/HackYourFuture/React","description":"Specifications React Module","fork":false,"url":"https://api.github.com/repos/HackYourFuture/React","forks_url":"https://api.github.com/repos/HackYourFuture/React/forks","keys_url":"https://api.github.com/repos/HackYourFuture/React/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackYourFuture/React/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackYourFuture/React/teams","hooks_url":"https://api.github.com/repos/HackYourFuture/React/hooks","issue_events_url":"https://api.github.com/repos/HackYourFuture/React/issues/events{/number}","events_url":"https://api.github.com/repos/HackYourFuture/React/events","assignees_url":"https://api.github.com/repos/HackYourFuture/React/assignees{/user}","branches_url":"https://api.github.com/repos/HackYourFuture/React/branches{/branch}","tags_url":"https://api.github.com/repos/HackYourFuture/React/tags","blobs_url":"https://api.github.com/repos/HackYourFuture/React/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackYourFuture/React/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackYourFuture/React/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackYourFuture/React/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackYourFuture/React/statuses/{sha}","languages_url":"https://api.github.com/repos/HackYourFuture/React/languages","stargazers_url":"https://api.github.com/repos/HackYourFuture/React/stargazers","contributors_url":"https://api.github.com/repos/HackYourFuture/React/contributors","subscribers_url":"https://api.github.com/repos/HackYourFuture/React/subscribers","subscription_url":"https://api.github.com/repos/HackYourFuture/React/subscription","commits_url":"https://api.github.com/repos/HackYourFuture/React/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackYourFuture/React/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackYourFuture/React/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackYourFuture/React/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackYourFuture/React/contents/{+path}","compare_url":"https://api.github.com/repos/HackYourFuture/React/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackYourFuture/React/merges","archive_url":"https://api.github.com/repos/HackYourFuture/React/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackYourFuture/React/downloads","issues_url":"https://api.github.com/repos/HackYourFuture/React/issues{/number}","pulls_url":"https://api.github.com/repos/HackYourFuture/React/pulls{/number}","milestones_url":"https://api.github.com/repos/HackYourFuture/React/milestones{/number}","notifications_url":"https://api.github.com/repos/HackYourFuture/React/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackYourFuture/React/labels{/name}","releases_url":"https://api.github.com/repos/HackYourFuture/React/releases{/id}","deployments_url":"https://api.github.com/repos/HackYourFuture/React/deployments","created_at":"2017-06-06T09:58:23Z","updated_at":"2018-10-11T16:10:09Z","pushed_at":"2018-11-24T19:32:23Z","git_url":"git://github.com/HackYourFuture/React.git","ssh_url":"git@github.com:HackYourFuture/React.git","clone_url":"https://github.com/HackYourFuture/React.git","svn_url":"https://github.com/HackYourFuture/React","homepage":null,"size":1102,"stargazers_count":17,"watchers_count":17,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"archived":false,"open_issues_count":55,"license":null,"forks":104,"open_issues":55,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/279"},"html":{"href":"https://github.com/HackYourFuture/React/pull/279"},"issue":{"href":"https://api.github.com/repos/HackYourFuture/React/issues/279"},"comments":{"href":"https://api.github.com/repos/HackYourFuture/React/issues/279/comments"},"review_comments":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/279/comments"},"review_comment":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/279/commits"},"statuses":{"href":"https://api.github.com/repos/HackYourFuture/React/statuses/6ba5a495eb517ee0ae8c78a857555d90d69107b3"}},"author_association":"NONE"}}
{"actor":{"display_login":"AllouhM"}}