{"action":"created","comment":{"url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/comments/202893892","pull_request_review_id":137675775,"id":202893892,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjg5Mzg5Mg==","diff_hunk":"@@ -0,0 +1,99 @@\n+import React from 'react';\n+import './_ciq-notification.scss';\n+\n+import CloseIcon from './icons/ic-close.svg';\n+import Warning from './icons/warning.svg';\n+import Error from './icons/error.svg';\n+import Success from './icons/success.svg';\n+import Info from './icons/info.svg';\n+\n+\n+const alertIconMaps = {\n+    info: Info,\n+    success: Success,\n+    warning: Warning,\n+    error: Error,\n+};\n+\n+class Notification extends React.Component {\n+    constructor(props) {\n+        super(props);\n+        this.state = { messages: [] };\n+    }\n+    onMessage(message, duration = 10) {\n+        const messages = this.state.messages;\n+        message.id = (new Date()).getTime();\n+        message.type = message.type || 'warning';\n+        message.hide = false;\n+\n+        messages.push(message);\n+        this.setState({\n+            messages,\n+        });\n+\n+        if (duration > 0) {\n+            setTimeout(() => this.onRemove(message.id), duration * 1000);\n+        }\n+    }\n+    onRemove(id) {\n+        let messages = this.state.messages.map((x) => {\n+            x.hide = x.id === id ? true : x.hide;\n+            return x;\n+        });\n+        this.setState({\n+            messages,\n+        });\n+\n+        setTimeout(() => {\n+            messages = messages.filter(x => x.id !== id);\n+            this.setState({\n+                messages,\n+            });\n+        }, 300);","path":"app/Notification.jsx","position":52,"original_position":52,"commit_id":"aefded9a3b40bf113a6600b083530af9f20d5d29","original_commit_id":"ceb000aff1bc3d59c91b070a8d0a03fcbe0830d6","user":{"login":"aminroosta","id":2920178,"node_id":"MDQ6VXNlcjI5MjAxNzg=","avatar_url":"https://avatars3.githubusercontent.com/u/2920178?v=4","gravatar_id":"","url":"https://api.github.com/users/aminroosta","html_url":"https://github.com/aminroosta","followers_url":"https://api.github.com/users/aminroosta/followers","following_url":"https://api.github.com/users/aminroosta/following{/other_user}","gists_url":"https://api.github.com/users/aminroosta/gists{/gist_id}","starred_url":"https://api.github.com/users/aminroosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aminroosta/subscriptions","organizations_url":"https://api.github.com/users/aminroosta/orgs","repos_url":"https://api.github.com/users/aminroosta/repos","events_url":"https://api.github.com/users/aminroosta/events{/privacy}","received_events_url":"https://api.github.com/users/aminroosta/received_events","type":"User","site_admin":false},"body":"I see, makes sense now :)","created_at":"2018-07-17T04:53:38Z","updated_at":"2018-07-17T04:53:38Z","html_url":"https://github.com/binary-com/SmartCharts/pull/363#discussion_r202893892","pull_request_url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/comments/202893892"},"html":{"href":"https://github.com/binary-com/SmartCharts/pull/363#discussion_r202893892"},"pull_request":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363"}},"in_reply_to_id":202876348},"pull_request":{"url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363","id":199628554,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NjI4NTU0","html_url":"https://github.com/binary-com/SmartCharts/pull/363","diff_url":"https://github.com/binary-com/SmartCharts/pull/363.diff","patch_url":"https://github.com/binary-com/SmartCharts/pull/363.patch","issue_url":"https://api.github.com/repos/binary-com/SmartCharts/issues/363","number":363,"state":"open","locked":false,"title":"Move notification out of app","user":{"login":"shayanbinary","id":38674882,"node_id":"MDQ6VXNlcjM4Njc0ODgy","avatar_url":"https://avatars3.githubusercontent.com/u/38674882?v=4","gravatar_id":"","url":"https://api.github.com/users/shayanbinary","html_url":"https://github.com/shayanbinary","followers_url":"https://api.github.com/users/shayanbinary/followers","following_url":"https://api.github.com/users/shayanbinary/following{/other_user}","gists_url":"https://api.github.com/users/shayanbinary/gists{/gist_id}","starred_url":"https://api.github.com/users/shayanbinary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shayanbinary/subscriptions","organizations_url":"https://api.github.com/users/shayanbinary/orgs","repos_url":"https://api.github.com/users/shayanbinary/repos","events_url":"https://api.github.com/users/shayanbinary/events{/privacy}","received_events_url":"https://api.github.com/users/shayanbinary/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-06T02:14:11Z","updated_at":"2018-07-17T04:53:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a93530dc707b2a3540f99a3924527cc0f022ebe0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363/commits","review_comments_url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363/comments","review_comment_url":"https://api.github.com/repos/binary-com/SmartCharts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/binary-com/SmartCharts/issues/363/comments","statuses_url":"https://api.github.com/repos/binary-com/SmartCharts/statuses/aefded9a3b40bf113a6600b083530af9f20d5d29","head":{"label":"shayanbinary:move-out-notification","ref":"move-out-notification","sha":"aefded9a3b40bf113a6600b083530af9f20d5d29","user":{"login":"shayanbinary","id":38674882,"node_id":"MDQ6VXNlcjM4Njc0ODgy","avatar_url":"https://avatars3.githubusercontent.com/u/38674882?v=4","gravatar_id":"","url":"https://api.github.com/users/shayanbinary","html_url":"https://github.com/shayanbinary","followers_url":"https://api.github.com/users/shayanbinary/followers","following_url":"https://api.github.com/users/shayanbinary/following{/other_user}","gists_url":"https://api.github.com/users/shayanbinary/gists{/gist_id}","starred_url":"https://api.github.com/users/shayanbinary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shayanbinary/subscriptions","organizations_url":"https://api.github.com/users/shayanbinary/orgs","repos_url":"https://api.github.com/users/shayanbinary/repos","events_url":"https://api.github.com/users/shayanbinary/events{/privacy}","received_events_url":"https://api.github.com/users/shayanbinary/received_events","type":"User","site_admin":false},"repo":{"id":130774405,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA3NzQ0MDU=","name":"SmartCharts","full_name":"shayanbinary/SmartCharts","owner":{"login":"shayanbinary","id":38674882,"node_id":"MDQ6VXNlcjM4Njc0ODgy","avatar_url":"https://avatars3.githubusercontent.com/u/38674882?v=4","gravatar_id":"","url":"https://api.github.com/users/shayanbinary","html_url":"https://github.com/shayanbinary","followers_url":"https://api.github.com/users/shayanbinary/followers","following_url":"https://api.github.com/users/shayanbinary/following{/other_user}","gists_url":"https://api.github.com/users/shayanbinary/gists{/gist_id}","starred_url":"https://api.github.com/users/shayanbinary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shayanbinary/subscriptions","organizations_url":"https://api.github.com/users/shayanbinary/orgs","repos_url":"https://api.github.com/users/shayanbinary/repos","events_url":"https://api.github.com/users/shayanbinary/events{/privacy}","received_events_url":"https://api.github.com/users/shayanbinary/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shayanbinary/SmartCharts","description":null,"fork":true,"url":"https://api.github.com/repos/shayanbinary/SmartCharts","forks_url":"https://api.github.com/repos/shayanbinary/SmartCharts/forks","keys_url":"https://api.github.com/repos/shayanbinary/SmartCharts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shayanbinary/SmartCharts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shayanbinary/SmartCharts/teams","hooks_url":"https://api.github.com/repos/shayanbinary/SmartCharts/hooks","issue_events_url":"https://api.github.com/repos/shayanbinary/SmartCharts/issues/events{/number}","events_url":"https://api.github.com/repos/shayanbinary/SmartCharts/events","assignees_url":"https://api.github.com/repos/shayanbinary/SmartCharts/assignees{/user}","branches_url":"https://api.github.com/repos/shayanbinary/SmartCharts/branches{/branch}","tags_url":"https://api.github.com/repos/shayanbinary/SmartCharts/tags","blobs_url":"https://api.github.com/repos/shayanbinary/SmartCharts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shayanbinary/SmartCharts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shayanbinary/SmartCharts/git/refs{/sha}","trees_url":"https://api.github.com/repos/shayanbinary/SmartCharts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shayanbinary/SmartCharts/statuses/{sha}","languages_url":"https://api.github.com/repos/shayanbinary/SmartCharts/languages","stargazers_url":"https://api.github.com/repos/shayanbinary/SmartCharts/stargazers","contributors_url":"https://api.github.com/repos/shayanbinary/SmartCharts/contributors","subscribers_url":"https://api.github.com/repos/shayanbinary/SmartCharts/subscribers","subscription_url":"https://api.github.com/repos/shayanbinary/SmartCharts/subscription","commits_url":"https://api.github.com/repos/shayanbinary/SmartCharts/commits{/sha}","git_commits_url":"https://api.github.com/repos/shayanbinary/SmartCharts/git/commits{/sha}","comments_url":"https://api.github.com/repos/shayanbinary/SmartCharts/comments{/number}","issue_comment_url":"https://api.github.com/repos/shayanbinary/SmartCharts/issues/comments{/number}","contents_url":"https://api.github.com/repos/shayanbinary/SmartCharts/contents/{+path}","compare_url":"https://api.github.com/repos/shayanbinary/SmartCharts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shayanbinary/SmartCharts/merges","archive_url":"https://api.github.com/repos/shayanbinary/SmartCharts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shayanbinary/SmartCharts/downloads","issues_url":"https://api.github.com/repos/shayanbinary/SmartCharts/issues{/number}","pulls_url":"https://api.github.com/repos/shayanbinary/SmartCharts/pulls{/number}","milestones_url":"https://api.github.com/repos/shayanbinary/SmartCharts/milestones{/number}","notifications_url":"https://api.github.com/repos/shayanbinary/SmartCharts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shayanbinary/SmartCharts/labels{/name}","releases_url":"https://api.github.com/repos/shayanbinary/SmartCharts/releases{/id}","deployments_url":"https://api.github.com/repos/shayanbinary/SmartCharts/deployments","created_at":"2018-04-24T00:44:49Z","updated_at":"2018-07-06T17:27:28Z","pushed_at":"2018-07-17T02:36:09Z","git_url":"git://github.com/shayanbinary/SmartCharts.git","ssh_url":"git@github.com:shayanbinary/SmartCharts.git","clone_url":"https://github.com/shayanbinary/SmartCharts.git","svn_url":"https://github.com/shayanbinary/SmartCharts","homepage":null,"size":54979,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"binary-com:dev","ref":"dev","sha":"479646f8d8b1ff0daf1a58dbc033254abf524ed5","user":{"login":"binary-com","id":7437559,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzc1NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7437559?v=4","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"repo":{"id":115597557,"node_id":"MDEwOlJlcG9zaXRvcnkxMTU1OTc1NTc=","name":"SmartCharts","full_name":"binary-com/SmartCharts","owner":{"login":"binary-com","id":7437559,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzc1NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7437559?v=4","gravatar_id":"","url":"https://api.github.com/users/binary-com","html_url":"https://github.com/binary-com","followers_url":"https://api.github.com/users/binary-com/followers","following_url":"https://api.github.com/users/binary-com/following{/other_user}","gists_url":"https://api.github.com/users/binary-com/gists{/gist_id}","starred_url":"https://api.github.com/users/binary-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary-com/subscriptions","organizations_url":"https://api.github.com/users/binary-com/orgs","repos_url":"https://api.github.com/users/binary-com/repos","events_url":"https://api.github.com/users/binary-com/events{/privacy}","received_events_url":"https://api.github.com/users/binary-com/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/binary-com/SmartCharts","description":null,"fork":false,"url":"https://api.github.com/repos/binary-com/SmartCharts","forks_url":"https://api.github.com/repos/binary-com/SmartCharts/forks","keys_url":"https://api.github.com/repos/binary-com/SmartCharts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binary-com/SmartCharts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binary-com/SmartCharts/teams","hooks_url":"https://api.github.com/repos/binary-com/SmartCharts/hooks","issue_events_url":"https://api.github.com/repos/binary-com/SmartCharts/issues/events{/number}","events_url":"https://api.github.com/repos/binary-com/SmartCharts/events","assignees_url":"https://api.github.com/repos/binary-com/SmartCharts/assignees{/user}","branches_url":"https://api.github.com/repos/binary-com/SmartCharts/branches{/branch}","tags_url":"https://api.github.com/repos/binary-com/SmartCharts/tags","blobs_url":"https://api.github.com/repos/binary-com/SmartCharts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binary-com/SmartCharts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binary-com/SmartCharts/git/refs{/sha}","trees_url":"https://api.github.com/repos/binary-com/SmartCharts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binary-com/SmartCharts/statuses/{sha}","languages_url":"https://api.github.com/repos/binary-com/SmartCharts/languages","stargazers_url":"https://api.github.com/repos/binary-com/SmartCharts/stargazers","contributors_url":"https://api.github.com/repos/binary-com/SmartCharts/contributors","subscribers_url":"https://api.github.com/repos/binary-com/SmartCharts/subscribers","subscription_url":"https://api.github.com/repos/binary-com/SmartCharts/subscription","commits_url":"https://api.github.com/repos/binary-com/SmartCharts/commits{/sha}","git_commits_url":"https://api.github.com/repos/binary-com/SmartCharts/git/commits{/sha}","comments_url":"https://api.github.com/repos/binary-com/SmartCharts/comments{/number}","issue_comment_url":"https://api.github.com/repos/binary-com/SmartCharts/issues/comments{/number}","contents_url":"https://api.github.com/repos/binary-com/SmartCharts/contents/{+path}","compare_url":"https://api.github.com/repos/binary-com/SmartCharts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binary-com/SmartCharts/merges","archive_url":"https://api.github.com/repos/binary-com/SmartCharts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binary-com/SmartCharts/downloads","issues_url":"https://api.github.com/repos/binary-com/SmartCharts/issues{/number}","pulls_url":"https://api.github.com/repos/binary-com/SmartCharts/pulls{/number}","milestones_url":"https://api.github.com/repos/binary-com/SmartCharts/milestones{/number}","notifications_url":"https://api.github.com/repos/binary-com/SmartCharts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binary-com/SmartCharts/labels{/name}","releases_url":"https://api.github.com/repos/binary-com/SmartCharts/releases{/id}","deployments_url":"https://api.github.com/repos/binary-com/SmartCharts/deployments","created_at":"2017-12-28T07:28:49Z","updated_at":"2018-07-17T03:26:26Z","pushed_at":"2018-07-17T03:30:36Z","git_url":"git://github.com/binary-com/SmartCharts.git","ssh_url":"git@github.com:binary-com/SmartCharts.git","clone_url":"https://github.com/binary-com/SmartCharts.git","svn_url":"https://github.com/binary-com/SmartCharts","homepage":null,"size":50456,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":10,"open_issues":8,"watchers":6,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363"},"html":{"href":"https://github.com/binary-com/SmartCharts/pull/363"},"issue":{"href":"https://api.github.com/repos/binary-com/SmartCharts/issues/363"},"comments":{"href":"https://api.github.com/repos/binary-com/SmartCharts/issues/363/comments"},"review_comments":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363/comments"},"review_comment":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/binary-com/SmartCharts/pulls/363/commits"},"statuses":{"href":"https://api.github.com/repos/binary-com/SmartCharts/statuses/aefded9a3b40bf113a6600b083530af9f20d5d29"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aminroosta"}}