{"action":"created","comment":{"url":"https://api.github.com/repos/Limunce/FB/pulls/comments/245487413","pull_request_review_id":189607377,"id":245487413,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTQ4NzQxMw==","diff_hunk":"@@ -0,0 +1,171 @@\n+import React, { useContext, useEffect, useState } from \"react\";\n+import \"./Articles.css\";\n+import moment from \"moment\";\n+\n+import { AppContext } from \"../../App.context\";\n+\n+// components\n+import Comments from \"../Comments/Comments\";\n+\n+// Func za datum\n+\n+function generateDate() {\n+  return moment()\n+    .startOf(\"second\")\n+    .fromNow();\n+}\n+\n+// const generateDate = () => {\n+//   return new Date().toLocaleString(\"en-GB\");\n+// };\n+// Func za datum end\n+\n+const generateStoryId = () => {\n+  return Math.random()\n+    .toString(15)\n+    .substr(2, 8);\n+};\n+\n+function Articles(props) {\n+  // useState\n+  const [name, setName] = useState(\"\");\n+  const [text, setText] = useState(\"\");\n+  const [formInvalid, setFormInvalid] = useState();\n+  const likedNumber = 0;\n+\n+  useEffect(\n+    () => {\n+      if (text) {\n+        setFormInvalid(false);\n+      } else {\n+        setFormInvalid(true);\n+      }\n+    },\n+    [text]\n+  );\n+\n+  const {\n+    articles,\n+    articlesDispatch,\n+    comments,\n+    commentsDispatch,\n+    counter,\n+    counterDispatch\n+  } = useContext(AppContext);\n+\n+  return (\n+    <div className=\"create-post\">\n+      <div className=\"create-post-title\">\n+        <h1>Create Post</h1>\n+      </div>\n+      <div className=\"create-post-box\">\n+        <div className=\"create-post-field\">\n+          <div className=\"profile-pic\">\n+            <a href=\"https://www.facebook.com/keka.limun.9?fref=comp\">\n+              <img\n+                src=\"https://scontent.fbeg4-1.fna.fbcdn.net/v/t1.0-1/c12.0.40.40a/p40x40/10354686_10150004552801856_220367501106153455_n.jpg?_nc_cat=1&_nc_ht=scontent.fbeg4-1.fna&oh=a5c0adc9f06f1af319095a902706f303&oe=5CD4171B\"\n+                alt=\"\"\n+                className=\"status-prof-pic\"\n+              />\n+            </a>\n+          </div>\n+          <div className=\"status-text\">\n+            <input\n+              value={text}\n+              placeholder=\"What's on your mind, Johnny?\"\n+              className=\"input-status\"\n+              onChange={e => {\n+                setText(e.target.value);\n+                setName(\n+                  <a\n+                    href=\"https://www.facebook.com/keka.limun.9?fref=comp\"\n+                    className=\"story-name\"\n+                  >\n+                    Johnny Lemon\n+                  </a>\n+                );\n+              }}\n+            />\n+          </div>\n+          <button\n+            className=\"share-btn\"\n+            disabled={formInvalid}\n+            onClick={e => {\n+              articlesDispatch({\n+                type: \"ADD_ARTICLE\",\n+                payload: {\n+                  name,\n+                  text,\n+                  currentDate: generateDate(),\n+                  storyId: generateStoryId(),\n+                  likedNumber\n+                }\n+              });\n+              setText(\"\");\n+            }}\n+          >\n+            Share\n+          </button>\n+          <div className=\"tag-buttons\">\n+            <button>Photo/Video</button>\n+            <button>Tag friends</button>\n+            <button>Feeling/Activity</button>\n+            <button>...</button>\n+          </div>\n+        </div>\n+      </div>\n+      <div className=\"container-post\">\n+        {articles.list.map(article => {\n+          const { text, name, currentDate, storyId, likedNumber } = article;\n+          return (\n+            <div className=\"post-box\">\n+              <h1>{name}</h1>\n+              <small>{currentDate}</small>","path":"src/components/Articles/Articles.js","position":123,"original_position":123,"commit_id":"74c686db3acef98d131350aeb40394f41164937d","original_commit_id":"74c686db3acef98d131350aeb40394f41164937d","user":{"login":"kalinicm","id":172022,"node_id":"MDQ6VXNlcjE3MjAyMg==","avatar_url":"https://avatars2.githubusercontent.com/u/172022?v=4","gravatar_id":"","url":"https://api.github.com/users/kalinicm","html_url":"https://github.com/kalinicm","followers_url":"https://api.github.com/users/kalinicm/followers","following_url":"https://api.github.com/users/kalinicm/following{/other_user}","gists_url":"https://api.github.com/users/kalinicm/gists{/gist_id}","starred_url":"https://api.github.com/users/kalinicm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalinicm/subscriptions","organizations_url":"https://api.github.com/users/kalinicm/orgs","repos_url":"https://api.github.com/users/kalinicm/repos","events_url":"https://api.github.com/users/kalinicm/events{/privacy}","received_events_url":"https://api.github.com/users/kalinicm/received_events","type":"User","site_admin":false},"body":"zameni samo\r\n```\r\n<small>{moment().diff(moment(currentDate),'seconds')} seconds ago</small>\r\n```\r\n\r\nOvde moment() znaci trenutno vreme, onda .diff() je funkcija koja prihvata novi moment() koji parsuje currentDate razliku u sekundama...\r\n\r\nKada dodas par komentara videces da se pojavljuje razlika..\r\n\r\nKada budes snimio u bazu podataka onda ce sve biti kako treba sa tom razlikom..","created_at":"2019-01-05T20:14:50Z","updated_at":"2019-01-05T20:14:50Z","html_url":"https://github.com/Limunce/FB/pull/4#discussion_r245487413","pull_request_url":"https://api.github.com/repos/Limunce/FB/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Limunce/FB/pulls/comments/245487413"},"html":{"href":"https://github.com/Limunce/FB/pull/4#discussion_r245487413"},"pull_request":{"href":"https://api.github.com/repos/Limunce/FB/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Limunce/FB/pulls/4","id":242186125,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMTg2MTI1","html_url":"https://github.com/Limunce/FB/pull/4","diff_url":"https://github.com/Limunce/FB/pull/4.diff","patch_url":"https://github.com/Limunce/FB/pull/4.patch","issue_url":"https://api.github.com/repos/Limunce/FB/issues/4","number":4,"state":"open","locked":false,"title":"Addingarticlesandcommentscomponents+counter","user":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"body":"Added Articles and Comments components \r\nZnam da ima puno koda, ali idu jedan uz drugi.\r\nMorao bi onda prvo da mi odobris Articles componentu, pa kad je mergujem onda tek da ubacim Comments component-u. \r\nAko ti je bas puno ti mi pisi, pa cu iz pocetka da odradim da prvo odobris Articles pa ostalo.\r\n\r\nProblemi:\r\n- [ ]  Like dugme radi i na statusima i na komentarima, ali kada imam vise od jednog statusa ili komentara onda se like sharuje\r\n\r\n- [ ] Uspeo sam komentare da vezem za posebnu vest, ali nisam uspeo( kao i prosli put) da se otvaraju samo ispod odredjenog status-a. Ali koliko vidim i na FB su stalno otvoreni\r\n\r\n- [ ] Naisao sam i na momentjs, ali i on mi nije radio sta sam hteo.\r\nPisacu ti u kodu tacno gde sam ga kucao i kako\r\n\r\n- [ ] Primetio sam da mi \"fali\" nesto u app naspram stare i vidim da nisam ubacio Reach Router. Pretpostavljam da si hteo i njega da implementiram? Mada ne znam da li mi I treba, jer ako sam te dobro razumeo samo ovo oko statusa treba da radi, sve ostalo statika,a statusi su svi na stranici samo se listaju. Necu imati tabove kao na B92 da se menja tip vesti itd.\r\n\r\n\r\nP.S.\r\nCSS fajlove ne moras da gledas, samo sam na brzinu dodao nesto kod-a da ne bude bas bez icega.","created_at":"2019-01-04T06:43:26Z","updated_at":"2019-01-05T20:14:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb2ae0d87e75133643079be8fabd5b2a540ae8a3","assignee":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"assignees":[{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Limunce/FB/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Limunce/FB/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Limunce/FB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Limunce/FB/issues/4/comments","statuses_url":"https://api.github.com/repos/Limunce/FB/statuses/74c686db3acef98d131350aeb40394f41164937d","head":{"label":"Limunce:addingarticlesandcommentscomponents+counter","ref":"addingarticlesandcommentscomponents+counter","sha":"74c686db3acef98d131350aeb40394f41164937d","user":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"repo":{"id":163633082,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM2MzMwODI=","name":"FB","full_name":"Limunce/FB","private":false,"owner":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Limunce/FB","description":"Facebook","fork":false,"url":"https://api.github.com/repos/Limunce/FB","forks_url":"https://api.github.com/repos/Limunce/FB/forks","keys_url":"https://api.github.com/repos/Limunce/FB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Limunce/FB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Limunce/FB/teams","hooks_url":"https://api.github.com/repos/Limunce/FB/hooks","issue_events_url":"https://api.github.com/repos/Limunce/FB/issues/events{/number}","events_url":"https://api.github.com/repos/Limunce/FB/events","assignees_url":"https://api.github.com/repos/Limunce/FB/assignees{/user}","branches_url":"https://api.github.com/repos/Limunce/FB/branches{/branch}","tags_url":"https://api.github.com/repos/Limunce/FB/tags","blobs_url":"https://api.github.com/repos/Limunce/FB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Limunce/FB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Limunce/FB/git/refs{/sha}","trees_url":"https://api.github.com/repos/Limunce/FB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Limunce/FB/statuses/{sha}","languages_url":"https://api.github.com/repos/Limunce/FB/languages","stargazers_url":"https://api.github.com/repos/Limunce/FB/stargazers","contributors_url":"https://api.github.com/repos/Limunce/FB/contributors","subscribers_url":"https://api.github.com/repos/Limunce/FB/subscribers","subscription_url":"https://api.github.com/repos/Limunce/FB/subscription","commits_url":"https://api.github.com/repos/Limunce/FB/commits{/sha}","git_commits_url":"https://api.github.com/repos/Limunce/FB/git/commits{/sha}","comments_url":"https://api.github.com/repos/Limunce/FB/comments{/number}","issue_comment_url":"https://api.github.com/repos/Limunce/FB/issues/comments{/number}","contents_url":"https://api.github.com/repos/Limunce/FB/contents/{+path}","compare_url":"https://api.github.com/repos/Limunce/FB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Limunce/FB/merges","archive_url":"https://api.github.com/repos/Limunce/FB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Limunce/FB/downloads","issues_url":"https://api.github.com/repos/Limunce/FB/issues{/number}","pulls_url":"https://api.github.com/repos/Limunce/FB/pulls{/number}","milestones_url":"https://api.github.com/repos/Limunce/FB/milestones{/number}","notifications_url":"https://api.github.com/repos/Limunce/FB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Limunce/FB/labels{/name}","releases_url":"https://api.github.com/repos/Limunce/FB/releases{/id}","deployments_url":"https://api.github.com/repos/Limunce/FB/deployments","created_at":"2018-12-31T02:35:57Z","updated_at":"2019-01-04T07:59:31Z","pushed_at":"2019-01-05T19:01:36Z","git_url":"git://github.com/Limunce/FB.git","ssh_url":"git@github.com:Limunce/FB.git","clone_url":"https://github.com/Limunce/FB.git","svn_url":"https://github.com/Limunce/FB","homepage":null,"size":186,"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":"Limunce:master","ref":"master","sha":"92eca0828297d2691e2f8d8c088448744d44f6ee","user":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"repo":{"id":163633082,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM2MzMwODI=","name":"FB","full_name":"Limunce/FB","private":false,"owner":{"login":"Limunce","id":34006580,"node_id":"MDQ6VXNlcjM0MDA2NTgw","avatar_url":"https://avatars3.githubusercontent.com/u/34006580?v=4","gravatar_id":"","url":"https://api.github.com/users/Limunce","html_url":"https://github.com/Limunce","followers_url":"https://api.github.com/users/Limunce/followers","following_url":"https://api.github.com/users/Limunce/following{/other_user}","gists_url":"https://api.github.com/users/Limunce/gists{/gist_id}","starred_url":"https://api.github.com/users/Limunce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limunce/subscriptions","organizations_url":"https://api.github.com/users/Limunce/orgs","repos_url":"https://api.github.com/users/Limunce/repos","events_url":"https://api.github.com/users/Limunce/events{/privacy}","received_events_url":"https://api.github.com/users/Limunce/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Limunce/FB","description":"Facebook","fork":false,"url":"https://api.github.com/repos/Limunce/FB","forks_url":"https://api.github.com/repos/Limunce/FB/forks","keys_url":"https://api.github.com/repos/Limunce/FB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Limunce/FB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Limunce/FB/teams","hooks_url":"https://api.github.com/repos/Limunce/FB/hooks","issue_events_url":"https://api.github.com/repos/Limunce/FB/issues/events{/number}","events_url":"https://api.github.com/repos/Limunce/FB/events","assignees_url":"https://api.github.com/repos/Limunce/FB/assignees{/user}","branches_url":"https://api.github.com/repos/Limunce/FB/branches{/branch}","tags_url":"https://api.github.com/repos/Limunce/FB/tags","blobs_url":"https://api.github.com/repos/Limunce/FB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Limunce/FB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Limunce/FB/git/refs{/sha}","trees_url":"https://api.github.com/repos/Limunce/FB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Limunce/FB/statuses/{sha}","languages_url":"https://api.github.com/repos/Limunce/FB/languages","stargazers_url":"https://api.github.com/repos/Limunce/FB/stargazers","contributors_url":"https://api.github.com/repos/Limunce/FB/contributors","subscribers_url":"https://api.github.com/repos/Limunce/FB/subscribers","subscription_url":"https://api.github.com/repos/Limunce/FB/subscription","commits_url":"https://api.github.com/repos/Limunce/FB/commits{/sha}","git_commits_url":"https://api.github.com/repos/Limunce/FB/git/commits{/sha}","comments_url":"https://api.github.com/repos/Limunce/FB/comments{/number}","issue_comment_url":"https://api.github.com/repos/Limunce/FB/issues/comments{/number}","contents_url":"https://api.github.com/repos/Limunce/FB/contents/{+path}","compare_url":"https://api.github.com/repos/Limunce/FB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Limunce/FB/merges","archive_url":"https://api.github.com/repos/Limunce/FB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Limunce/FB/downloads","issues_url":"https://api.github.com/repos/Limunce/FB/issues{/number}","pulls_url":"https://api.github.com/repos/Limunce/FB/pulls{/number}","milestones_url":"https://api.github.com/repos/Limunce/FB/milestones{/number}","notifications_url":"https://api.github.com/repos/Limunce/FB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Limunce/FB/labels{/name}","releases_url":"https://api.github.com/repos/Limunce/FB/releases{/id}","deployments_url":"https://api.github.com/repos/Limunce/FB/deployments","created_at":"2018-12-31T02:35:57Z","updated_at":"2019-01-04T07:59:31Z","pushed_at":"2019-01-05T19:01:36Z","git_url":"git://github.com/Limunce/FB.git","ssh_url":"git@github.com:Limunce/FB.git","clone_url":"https://github.com/Limunce/FB.git","svn_url":"https://github.com/Limunce/FB","homepage":null,"size":186,"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/Limunce/FB/pulls/4"},"html":{"href":"https://github.com/Limunce/FB/pull/4"},"issue":{"href":"https://api.github.com/repos/Limunce/FB/issues/4"},"comments":{"href":"https://api.github.com/repos/Limunce/FB/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Limunce/FB/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Limunce/FB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Limunce/FB/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Limunce/FB/statuses/74c686db3acef98d131350aeb40394f41164937d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kalinicm"}}