{"action":"created","comment":{"url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/comments/210896273","pull_request_review_id":147206040,"id":210896273,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDg5NjI3Mw==","diff_hunk":"@@ -0,0 +1,79 @@\n+import React, { Fragment } from 'react';\n+import { View, Text, TextInput } from 'react-native';\n+import Button from './Button';\n+import styles from './AddToDo.styles';\n+import Header from './Header';\n+import strings from '../assets/strings';\n+\n+class AddToDo extends React.Component {\n+  constructor(props) {\n+    super(props);\n+    this.state = { taskTitle: '', taskDescription: '', error: '' };\n+  }\n+\n+  validateNewTask = () => {\n+    const { addToDo } = this.props;\n+    const { emptyTextOrDescription } = strings;\n+    if (this.state.taskTitle.length !== 0 && this.state.taskDescription.length !== 0) {\n+      addToDo(this.state.taskTitle, this.state.taskDescription);\n+    } else {\n+      this.setState({ error: emptyTextOrDescription });\n+    }\n+  }\n+\n+  renderError = () => {\n+    const { errorContainer, errorStyle } = styles;\n+    if (this.state.error.length !== 0) {\n+      return <View style={errorContainer}><Text style={errorStyle}>{this.state.error}</Text></View>;","path":"src/components/AddToDo.js","position":27,"original_position":27,"commit_id":"519f6e13bc8633b388bdccbf77b387ea51db6bef","original_commit_id":"519f6e13bc8633b388bdccbf77b387ea51db6bef","user":{"login":"ConiCurzio","id":35457612,"node_id":"MDQ6VXNlcjM1NDU3NjEy","avatar_url":"https://avatars1.githubusercontent.com/u/35457612?v=4","gravatar_id":"","url":"https://api.github.com/users/ConiCurzio","html_url":"https://github.com/ConiCurzio","followers_url":"https://api.github.com/users/ConiCurzio/followers","following_url":"https://api.github.com/users/ConiCurzio/following{/other_user}","gists_url":"https://api.github.com/users/ConiCurzio/gists{/gist_id}","starred_url":"https://api.github.com/users/ConiCurzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConiCurzio/subscriptions","organizations_url":"https://api.github.com/users/ConiCurzio/orgs","repos_url":"https://api.github.com/users/ConiCurzio/repos","events_url":"https://api.github.com/users/ConiCurzio/events{/privacy}","received_events_url":"https://api.github.com/users/ConiCurzio/received_events","type":"User","site_admin":false},"body":"Here maybe you can use a conditional rendering such as `{this.state.error ? <View..> : <View />}` inside the return method below.","created_at":"2018-08-17T12:41:46Z","updated_at":"2018-08-17T12:49:04Z","html_url":"https://github.com/nicoache1/TodoApp/pull/1#discussion_r210896273","pull_request_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/comments/210896273"},"html":{"href":"https://github.com/nicoache1/TodoApp/pull/1#discussion_r210896273"},"pull_request":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1"}},"in_reply_to_id":210741281},"pull_request":{"url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1","id":208975516,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4OTc1NTE2","html_url":"https://github.com/nicoache1/TodoApp/pull/1","diff_url":"https://github.com/nicoache1/TodoApp/pull/1.diff","patch_url":"https://github.com/nicoache1/TodoApp/pull/1.patch","issue_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/1","number":1,"state":"open","locked":false,"title":"Feature/first screen","user":{"login":"nicoache1","id":26419582,"node_id":"MDQ6VXNlcjI2NDE5NTgy","avatar_url":"https://avatars0.githubusercontent.com/u/26419582?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoache1","html_url":"https://github.com/nicoache1","followers_url":"https://api.github.com/users/nicoache1/followers","following_url":"https://api.github.com/users/nicoache1/following{/other_user}","gists_url":"https://api.github.com/users/nicoache1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoache1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoache1/subscriptions","organizations_url":"https://api.github.com/users/nicoache1/orgs","repos_url":"https://api.github.com/users/nicoache1/repos","events_url":"https://api.github.com/users/nicoache1/events{/privacy}","received_events_url":"https://api.github.com/users/nicoache1/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-16T20:29:35Z","updated_at":"2018-08-17T12:49:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced962d01cfedf26efe48cfc4f4eed7f9eff18ea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1/commits","review_comments_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1/comments","review_comment_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/1/comments","statuses_url":"https://api.github.com/repos/nicoache1/TodoApp/statuses/519f6e13bc8633b388bdccbf77b387ea51db6bef","head":{"label":"nicoache1:feature/FirstScreen","ref":"feature/FirstScreen","sha":"519f6e13bc8633b388bdccbf77b387ea51db6bef","user":{"login":"nicoache1","id":26419582,"node_id":"MDQ6VXNlcjI2NDE5NTgy","avatar_url":"https://avatars0.githubusercontent.com/u/26419582?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoache1","html_url":"https://github.com/nicoache1","followers_url":"https://api.github.com/users/nicoache1/followers","following_url":"https://api.github.com/users/nicoache1/following{/other_user}","gists_url":"https://api.github.com/users/nicoache1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoache1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoache1/subscriptions","organizations_url":"https://api.github.com/users/nicoache1/orgs","repos_url":"https://api.github.com/users/nicoache1/repos","events_url":"https://api.github.com/users/nicoache1/events{/privacy}","received_events_url":"https://api.github.com/users/nicoache1/received_events","type":"User","site_admin":false},"repo":{"id":144878565,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4Nzg1NjU=","name":"TodoApp","full_name":"nicoache1/TodoApp","owner":{"login":"nicoache1","id":26419582,"node_id":"MDQ6VXNlcjI2NDE5NTgy","avatar_url":"https://avatars0.githubusercontent.com/u/26419582?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoache1","html_url":"https://github.com/nicoache1","followers_url":"https://api.github.com/users/nicoache1/followers","following_url":"https://api.github.com/users/nicoache1/following{/other_user}","gists_url":"https://api.github.com/users/nicoache1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoache1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoache1/subscriptions","organizations_url":"https://api.github.com/users/nicoache1/orgs","repos_url":"https://api.github.com/users/nicoache1/repos","events_url":"https://api.github.com/users/nicoache1/events{/privacy}","received_events_url":"https://api.github.com/users/nicoache1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicoache1/TodoApp","description":null,"fork":false,"url":"https://api.github.com/repos/nicoache1/TodoApp","forks_url":"https://api.github.com/repos/nicoache1/TodoApp/forks","keys_url":"https://api.github.com/repos/nicoache1/TodoApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicoache1/TodoApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicoache1/TodoApp/teams","hooks_url":"https://api.github.com/repos/nicoache1/TodoApp/hooks","issue_events_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/events{/number}","events_url":"https://api.github.com/repos/nicoache1/TodoApp/events","assignees_url":"https://api.github.com/repos/nicoache1/TodoApp/assignees{/user}","branches_url":"https://api.github.com/repos/nicoache1/TodoApp/branches{/branch}","tags_url":"https://api.github.com/repos/nicoache1/TodoApp/tags","blobs_url":"https://api.github.com/repos/nicoache1/TodoApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicoache1/TodoApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicoache1/TodoApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicoache1/TodoApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicoache1/TodoApp/statuses/{sha}","languages_url":"https://api.github.com/repos/nicoache1/TodoApp/languages","stargazers_url":"https://api.github.com/repos/nicoache1/TodoApp/stargazers","contributors_url":"https://api.github.com/repos/nicoache1/TodoApp/contributors","subscribers_url":"https://api.github.com/repos/nicoache1/TodoApp/subscribers","subscription_url":"https://api.github.com/repos/nicoache1/TodoApp/subscription","commits_url":"https://api.github.com/repos/nicoache1/TodoApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicoache1/TodoApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicoache1/TodoApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicoache1/TodoApp/contents/{+path}","compare_url":"https://api.github.com/repos/nicoache1/TodoApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicoache1/TodoApp/merges","archive_url":"https://api.github.com/repos/nicoache1/TodoApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicoache1/TodoApp/downloads","issues_url":"https://api.github.com/repos/nicoache1/TodoApp/issues{/number}","pulls_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls{/number}","milestones_url":"https://api.github.com/repos/nicoache1/TodoApp/milestones{/number}","notifications_url":"https://api.github.com/repos/nicoache1/TodoApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicoache1/TodoApp/labels{/name}","releases_url":"https://api.github.com/repos/nicoache1/TodoApp/releases{/id}","deployments_url":"https://api.github.com/repos/nicoache1/TodoApp/deployments","created_at":"2018-08-15T16:44:26Z","updated_at":"2018-08-15T16:54:50Z","pushed_at":"2018-08-16T20:29:36Z","git_url":"git://github.com/nicoache1/TodoApp.git","ssh_url":"git@github.com:nicoache1/TodoApp.git","clone_url":"https://github.com/nicoache1/TodoApp.git","svn_url":"https://github.com/nicoache1/TodoApp","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nicoache1:develop","ref":"develop","sha":"277b10102047a76a31cec96b8483becbca04c838","user":{"login":"nicoache1","id":26419582,"node_id":"MDQ6VXNlcjI2NDE5NTgy","avatar_url":"https://avatars0.githubusercontent.com/u/26419582?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoache1","html_url":"https://github.com/nicoache1","followers_url":"https://api.github.com/users/nicoache1/followers","following_url":"https://api.github.com/users/nicoache1/following{/other_user}","gists_url":"https://api.github.com/users/nicoache1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoache1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoache1/subscriptions","organizations_url":"https://api.github.com/users/nicoache1/orgs","repos_url":"https://api.github.com/users/nicoache1/repos","events_url":"https://api.github.com/users/nicoache1/events{/privacy}","received_events_url":"https://api.github.com/users/nicoache1/received_events","type":"User","site_admin":false},"repo":{"id":144878565,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4Nzg1NjU=","name":"TodoApp","full_name":"nicoache1/TodoApp","owner":{"login":"nicoache1","id":26419582,"node_id":"MDQ6VXNlcjI2NDE5NTgy","avatar_url":"https://avatars0.githubusercontent.com/u/26419582?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoache1","html_url":"https://github.com/nicoache1","followers_url":"https://api.github.com/users/nicoache1/followers","following_url":"https://api.github.com/users/nicoache1/following{/other_user}","gists_url":"https://api.github.com/users/nicoache1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoache1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoache1/subscriptions","organizations_url":"https://api.github.com/users/nicoache1/orgs","repos_url":"https://api.github.com/users/nicoache1/repos","events_url":"https://api.github.com/users/nicoache1/events{/privacy}","received_events_url":"https://api.github.com/users/nicoache1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicoache1/TodoApp","description":null,"fork":false,"url":"https://api.github.com/repos/nicoache1/TodoApp","forks_url":"https://api.github.com/repos/nicoache1/TodoApp/forks","keys_url":"https://api.github.com/repos/nicoache1/TodoApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicoache1/TodoApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicoache1/TodoApp/teams","hooks_url":"https://api.github.com/repos/nicoache1/TodoApp/hooks","issue_events_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/events{/number}","events_url":"https://api.github.com/repos/nicoache1/TodoApp/events","assignees_url":"https://api.github.com/repos/nicoache1/TodoApp/assignees{/user}","branches_url":"https://api.github.com/repos/nicoache1/TodoApp/branches{/branch}","tags_url":"https://api.github.com/repos/nicoache1/TodoApp/tags","blobs_url":"https://api.github.com/repos/nicoache1/TodoApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicoache1/TodoApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicoache1/TodoApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicoache1/TodoApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicoache1/TodoApp/statuses/{sha}","languages_url":"https://api.github.com/repos/nicoache1/TodoApp/languages","stargazers_url":"https://api.github.com/repos/nicoache1/TodoApp/stargazers","contributors_url":"https://api.github.com/repos/nicoache1/TodoApp/contributors","subscribers_url":"https://api.github.com/repos/nicoache1/TodoApp/subscribers","subscription_url":"https://api.github.com/repos/nicoache1/TodoApp/subscription","commits_url":"https://api.github.com/repos/nicoache1/TodoApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicoache1/TodoApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicoache1/TodoApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicoache1/TodoApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicoache1/TodoApp/contents/{+path}","compare_url":"https://api.github.com/repos/nicoache1/TodoApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicoache1/TodoApp/merges","archive_url":"https://api.github.com/repos/nicoache1/TodoApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicoache1/TodoApp/downloads","issues_url":"https://api.github.com/repos/nicoache1/TodoApp/issues{/number}","pulls_url":"https://api.github.com/repos/nicoache1/TodoApp/pulls{/number}","milestones_url":"https://api.github.com/repos/nicoache1/TodoApp/milestones{/number}","notifications_url":"https://api.github.com/repos/nicoache1/TodoApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicoache1/TodoApp/labels{/name}","releases_url":"https://api.github.com/repos/nicoache1/TodoApp/releases{/id}","deployments_url":"https://api.github.com/repos/nicoache1/TodoApp/deployments","created_at":"2018-08-15T16:44:26Z","updated_at":"2018-08-15T16:54:50Z","pushed_at":"2018-08-16T20:29:36Z","git_url":"git://github.com/nicoache1/TodoApp.git","ssh_url":"git@github.com:nicoache1/TodoApp.git","clone_url":"https://github.com/nicoache1/TodoApp.git","svn_url":"https://github.com/nicoache1/TodoApp","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1"},"html":{"href":"https://github.com/nicoache1/TodoApp/pull/1"},"issue":{"href":"https://api.github.com/repos/nicoache1/TodoApp/issues/1"},"comments":{"href":"https://api.github.com/repos/nicoache1/TodoApp/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nicoache1/TodoApp/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/nicoache1/TodoApp/statuses/519f6e13bc8633b388bdccbf77b387ea51db6bef"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ConiCurzio"}}