{"action":"created","comment":{"url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/comments/205389298","pull_request_review_id":140644821,"id":205389298,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTM4OTI5OA==","diff_hunk":"@@ -0,0 +1,96 @@\n+import React from 'react'\n+import { Field, reduxForm } from 'redux-form'\n+import { inputDateRange } from '../constants/constants'\n+import { Redirect, Link } from 'react-router-dom'\n+import { Button, Icon } from 'semantic-ui-react'\n+import {\n+  renderTextInputField,\n+  renderCheckboxInputField,\n+  renderDateInputField,\n+} from './inputComponents/inputComponents'\n+import '../styles/register.css'\n+\n+const validate = values => {\n+  const errors = {}\n+  if (!values.firstName) {\n+    errors.firstName = 'Required'\n+  }\n+  if (!values.secondName) {\n+    errors.secondName = 'Required'\n+  }\n+  if (!values.password) {\n+    errors.password = 'Required'\n+  } else if (values.password.length < 6) {\n+    errors.password = 'Must be 6 characters or more'\n+  } else if (!/[A-Z]/.test(values.password)) {\n+    errors.password = 'Must contain 1 uppercase letter at least'\n+  }\n+  if (!values.confirmedPassword) {\n+    errors.confirmedPassword = 'Required'\n+  } else if (values.password !== values.confirmedPassword) {\n+    errors.confirmedPassword = 'Passwords must be the same'\n+  }\n+  if (!values.email) {\n+    errors.email = 'Required'\n+  } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.email)) {\n+    errors.email = 'Invalid email address'\n+  }\n+  return errors\n+}\n+\n+// ToDo: i'll create asyncValidate for checking equal emails\n+// const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))\n+// const asyncValidate = (values/*, dispatch */) => {\n+//   return sleep(1000) // simulate server latency\n+//     .then(() => {\n+//       if ([ 'john', 'paul', 'george', 'ringo' ].includes(values.username)) {\n+//         throw { username: 'That username is taken' }\n+//       }\n+//     })\n+// }\n+\n+const RegistrationForm = props => {\n+  const { handleSubmit, submitting } = props\n+  return (\n+    <form className=\"registration__form\" onSubmit={handleSubmit}>\n+      <Link to=\"/\" className=\"registration__link-to-home\">\n+        <Icon disabled name=\"arrow circle left\" size=\"big\" className=\"link-to-home_icon\" />\n+      </Link>\n+      <h2 className=\"registration-header-text\">Register</h2>\n+      <Field name=\"firstName\" type=\"text\" component={renderTextInputField} label=\"First name\" />\n+      <Field name=\"secondName\" type=\"text\" component={renderTextInputField} label=\"Second name\" />\n+      <Field name=\"email\" type=\"email\" component={renderTextInputField} label=\"Email\" />","path":"src/components/RegistrationForm.js","position":62,"original_position":62,"commit_id":"e6ea9f04f6f905ecc9da46cac3a6c928050e9908","original_commit_id":"e6ea9f04f6f905ecc9da46cac3a6c928050e9908","user":{"login":"mxbelski","id":29888574,"node_id":"MDQ6VXNlcjI5ODg4NTc0","avatar_url":"https://avatars0.githubusercontent.com/u/29888574?v=4","gravatar_id":"","url":"https://api.github.com/users/mxbelski","html_url":"https://github.com/mxbelski","followers_url":"https://api.github.com/users/mxbelski/followers","following_url":"https://api.github.com/users/mxbelski/following{/other_user}","gists_url":"https://api.github.com/users/mxbelski/gists{/gist_id}","starred_url":"https://api.github.com/users/mxbelski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxbelski/subscriptions","organizations_url":"https://api.github.com/users/mxbelski/orgs","repos_url":"https://api.github.com/users/mxbelski/repos","events_url":"https://api.github.com/users/mxbelski/events{/privacy}","received_events_url":"https://api.github.com/users/mxbelski/received_events","type":"User","site_admin":false},"body":"and everywhere there.","created_at":"2018-07-26T09:28:54Z","updated_at":"2018-07-26T09:37:04Z","html_url":"https://github.com/SergeySheps/Pizza_project/pull/3#discussion_r205389298","pull_request_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/comments/205389298"},"html":{"href":"https://github.com/SergeySheps/Pizza_project/pull/3#discussion_r205389298"},"pull_request":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3","id":204066249,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDY2MjQ5","html_url":"https://github.com/SergeySheps/Pizza_project/pull/3","diff_url":"https://github.com/SergeySheps/Pizza_project/pull/3.diff","patch_url":"https://github.com/SergeySheps/Pizza_project/pull/3.patch","issue_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/3","number":3,"state":"open","locked":false,"title":"added registration and login forms","user":{"login":"SergeySheps","id":30042952,"node_id":"MDQ6VXNlcjMwMDQyOTUy","avatar_url":"https://avatars1.githubusercontent.com/u/30042952?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeySheps","html_url":"https://github.com/SergeySheps","followers_url":"https://api.github.com/users/SergeySheps/followers","following_url":"https://api.github.com/users/SergeySheps/following{/other_user}","gists_url":"https://api.github.com/users/SergeySheps/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeySheps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeySheps/subscriptions","organizations_url":"https://api.github.com/users/SergeySheps/orgs","repos_url":"https://api.github.com/users/SergeySheps/repos","events_url":"https://api.github.com/users/SergeySheps/events{/privacy}","received_events_url":"https://api.github.com/users/SergeySheps/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-26T08:34:10Z","updated_at":"2018-07-26T09:37:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a69cb773764a4e2a937dace0a792bd93f6a25a74","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3/commits","review_comments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3/comments","review_comment_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/3/comments","statuses_url":"https://api.github.com/repos/SergeySheps/Pizza_project/statuses/e6ea9f04f6f905ecc9da46cac3a6c928050e9908","head":{"label":"SergeySheps:develop-client-fetch-implementation","ref":"develop-client-fetch-implementation","sha":"e6ea9f04f6f905ecc9da46cac3a6c928050e9908","user":{"login":"SergeySheps","id":30042952,"node_id":"MDQ6VXNlcjMwMDQyOTUy","avatar_url":"https://avatars1.githubusercontent.com/u/30042952?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeySheps","html_url":"https://github.com/SergeySheps","followers_url":"https://api.github.com/users/SergeySheps/followers","following_url":"https://api.github.com/users/SergeySheps/following{/other_user}","gists_url":"https://api.github.com/users/SergeySheps/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeySheps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeySheps/subscriptions","organizations_url":"https://api.github.com/users/SergeySheps/orgs","repos_url":"https://api.github.com/users/SergeySheps/repos","events_url":"https://api.github.com/users/SergeySheps/events{/privacy}","received_events_url":"https://api.github.com/users/SergeySheps/received_events","type":"User","site_admin":false},"repo":{"id":141597374,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1OTczNzQ=","name":"Pizza_project","full_name":"SergeySheps/Pizza_project","owner":{"login":"SergeySheps","id":30042952,"node_id":"MDQ6VXNlcjMwMDQyOTUy","avatar_url":"https://avatars1.githubusercontent.com/u/30042952?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeySheps","html_url":"https://github.com/SergeySheps","followers_url":"https://api.github.com/users/SergeySheps/followers","following_url":"https://api.github.com/users/SergeySheps/following{/other_user}","gists_url":"https://api.github.com/users/SergeySheps/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeySheps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeySheps/subscriptions","organizations_url":"https://api.github.com/users/SergeySheps/orgs","repos_url":"https://api.github.com/users/SergeySheps/repos","events_url":"https://api.github.com/users/SergeySheps/events{/privacy}","received_events_url":"https://api.github.com/users/SergeySheps/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SergeySheps/Pizza_project","description":null,"fork":false,"url":"https://api.github.com/repos/SergeySheps/Pizza_project","forks_url":"https://api.github.com/repos/SergeySheps/Pizza_project/forks","keys_url":"https://api.github.com/repos/SergeySheps/Pizza_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SergeySheps/Pizza_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SergeySheps/Pizza_project/teams","hooks_url":"https://api.github.com/repos/SergeySheps/Pizza_project/hooks","issue_events_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/events{/number}","events_url":"https://api.github.com/repos/SergeySheps/Pizza_project/events","assignees_url":"https://api.github.com/repos/SergeySheps/Pizza_project/assignees{/user}","branches_url":"https://api.github.com/repos/SergeySheps/Pizza_project/branches{/branch}","tags_url":"https://api.github.com/repos/SergeySheps/Pizza_project/tags","blobs_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SergeySheps/Pizza_project/statuses/{sha}","languages_url":"https://api.github.com/repos/SergeySheps/Pizza_project/languages","stargazers_url":"https://api.github.com/repos/SergeySheps/Pizza_project/stargazers","contributors_url":"https://api.github.com/repos/SergeySheps/Pizza_project/contributors","subscribers_url":"https://api.github.com/repos/SergeySheps/Pizza_project/subscribers","subscription_url":"https://api.github.com/repos/SergeySheps/Pizza_project/subscription","commits_url":"https://api.github.com/repos/SergeySheps/Pizza_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/SergeySheps/Pizza_project/contents/{+path}","compare_url":"https://api.github.com/repos/SergeySheps/Pizza_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SergeySheps/Pizza_project/merges","archive_url":"https://api.github.com/repos/SergeySheps/Pizza_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SergeySheps/Pizza_project/downloads","issues_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues{/number}","pulls_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls{/number}","milestones_url":"https://api.github.com/repos/SergeySheps/Pizza_project/milestones{/number}","notifications_url":"https://api.github.com/repos/SergeySheps/Pizza_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SergeySheps/Pizza_project/labels{/name}","releases_url":"https://api.github.com/repos/SergeySheps/Pizza_project/releases{/id}","deployments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/deployments","created_at":"2018-07-19T15:18:50Z","updated_at":"2018-07-19T15:25:09Z","pushed_at":"2018-07-26T09:16:00Z","git_url":"git://github.com/SergeySheps/Pizza_project.git","ssh_url":"git@github.com:SergeySheps/Pizza_project.git","clone_url":"https://github.com/SergeySheps/Pizza_project.git","svn_url":"https://github.com/SergeySheps/Pizza_project","homepage":null,"size":253,"stargazers_count":0,"watchers_count":0,"language":null,"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":"SergeySheps:develop","ref":"develop","sha":"9e42568c67f9cd320b034575bc428ce14ff1f1e5","user":{"login":"SergeySheps","id":30042952,"node_id":"MDQ6VXNlcjMwMDQyOTUy","avatar_url":"https://avatars1.githubusercontent.com/u/30042952?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeySheps","html_url":"https://github.com/SergeySheps","followers_url":"https://api.github.com/users/SergeySheps/followers","following_url":"https://api.github.com/users/SergeySheps/following{/other_user}","gists_url":"https://api.github.com/users/SergeySheps/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeySheps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeySheps/subscriptions","organizations_url":"https://api.github.com/users/SergeySheps/orgs","repos_url":"https://api.github.com/users/SergeySheps/repos","events_url":"https://api.github.com/users/SergeySheps/events{/privacy}","received_events_url":"https://api.github.com/users/SergeySheps/received_events","type":"User","site_admin":false},"repo":{"id":141597374,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1OTczNzQ=","name":"Pizza_project","full_name":"SergeySheps/Pizza_project","owner":{"login":"SergeySheps","id":30042952,"node_id":"MDQ6VXNlcjMwMDQyOTUy","avatar_url":"https://avatars1.githubusercontent.com/u/30042952?v=4","gravatar_id":"","url":"https://api.github.com/users/SergeySheps","html_url":"https://github.com/SergeySheps","followers_url":"https://api.github.com/users/SergeySheps/followers","following_url":"https://api.github.com/users/SergeySheps/following{/other_user}","gists_url":"https://api.github.com/users/SergeySheps/gists{/gist_id}","starred_url":"https://api.github.com/users/SergeySheps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergeySheps/subscriptions","organizations_url":"https://api.github.com/users/SergeySheps/orgs","repos_url":"https://api.github.com/users/SergeySheps/repos","events_url":"https://api.github.com/users/SergeySheps/events{/privacy}","received_events_url":"https://api.github.com/users/SergeySheps/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SergeySheps/Pizza_project","description":null,"fork":false,"url":"https://api.github.com/repos/SergeySheps/Pizza_project","forks_url":"https://api.github.com/repos/SergeySheps/Pizza_project/forks","keys_url":"https://api.github.com/repos/SergeySheps/Pizza_project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SergeySheps/Pizza_project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SergeySheps/Pizza_project/teams","hooks_url":"https://api.github.com/repos/SergeySheps/Pizza_project/hooks","issue_events_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/events{/number}","events_url":"https://api.github.com/repos/SergeySheps/Pizza_project/events","assignees_url":"https://api.github.com/repos/SergeySheps/Pizza_project/assignees{/user}","branches_url":"https://api.github.com/repos/SergeySheps/Pizza_project/branches{/branch}","tags_url":"https://api.github.com/repos/SergeySheps/Pizza_project/tags","blobs_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/refs{/sha}","trees_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SergeySheps/Pizza_project/statuses/{sha}","languages_url":"https://api.github.com/repos/SergeySheps/Pizza_project/languages","stargazers_url":"https://api.github.com/repos/SergeySheps/Pizza_project/stargazers","contributors_url":"https://api.github.com/repos/SergeySheps/Pizza_project/contributors","subscribers_url":"https://api.github.com/repos/SergeySheps/Pizza_project/subscribers","subscription_url":"https://api.github.com/repos/SergeySheps/Pizza_project/subscription","commits_url":"https://api.github.com/repos/SergeySheps/Pizza_project/commits{/sha}","git_commits_url":"https://api.github.com/repos/SergeySheps/Pizza_project/git/commits{/sha}","comments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/comments{/number}","issue_comment_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/comments{/number}","contents_url":"https://api.github.com/repos/SergeySheps/Pizza_project/contents/{+path}","compare_url":"https://api.github.com/repos/SergeySheps/Pizza_project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SergeySheps/Pizza_project/merges","archive_url":"https://api.github.com/repos/SergeySheps/Pizza_project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SergeySheps/Pizza_project/downloads","issues_url":"https://api.github.com/repos/SergeySheps/Pizza_project/issues{/number}","pulls_url":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls{/number}","milestones_url":"https://api.github.com/repos/SergeySheps/Pizza_project/milestones{/number}","notifications_url":"https://api.github.com/repos/SergeySheps/Pizza_project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SergeySheps/Pizza_project/labels{/name}","releases_url":"https://api.github.com/repos/SergeySheps/Pizza_project/releases{/id}","deployments_url":"https://api.github.com/repos/SergeySheps/Pizza_project/deployments","created_at":"2018-07-19T15:18:50Z","updated_at":"2018-07-19T15:25:09Z","pushed_at":"2018-07-26T09:16:00Z","git_url":"git://github.com/SergeySheps/Pizza_project.git","ssh_url":"git@github.com:SergeySheps/Pizza_project.git","clone_url":"https://github.com/SergeySheps/Pizza_project.git","svn_url":"https://github.com/SergeySheps/Pizza_project","homepage":null,"size":253,"stargazers_count":0,"watchers_count":0,"language":null,"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/SergeySheps/Pizza_project/pulls/3"},"html":{"href":"https://github.com/SergeySheps/Pizza_project/pull/3"},"issue":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/3"},"comments":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/SergeySheps/Pizza_project/statuses/e6ea9f04f6f905ecc9da46cac3a6c928050e9908"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mxbelski"}}