{"action":"created","comment":{"url":"https://api.github.com/repos/reshufflehq/trivia/pulls/comments/332242910","pull_request_review_id":298390240,"id":332242910,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMjI0MjkxMA==","diff_hunk":"@@ -0,0 +1,135 @@\n+import { update } from '@reshuffle/db';\n+import errorType from './constants';\n+\n+/**\n+ * Get trivia questions\n+ */\n+/* @expose */\n+export async function getTriviaData() {\n+  try {\n+    return update('trivia', (result = data) => {\n+      return result;\n+    });\n+  } catch (error) {\n+    console.error('getTriviaData -> error', error.message);\n+    return new Error(errorType.fetch);\n+  }\n+}\n+\n+/**\n+ * Initial data for trivia questions\n+ */\n+const data = [\n+  {\n+    category: 'React 101',\n+    questions: [\n+      {\n+        points: 100,\n+        question:\n+          '<p>What part of your application does React focus on?</p><ol><li>The Model</li><li>The View</li><li>The Controller</li></ol>',\n+        answer: 'B. The View',\n+      },\n+      {\n+        points: 200,\n+        question: '_____ lets you create JavaScript objects using HTML syntax',\n+        answer: 'JSX',\n+      },\n+      {\n+        points: 300,\n+        question: 'What tool can you use to transpile JSX?',\n+        answer: 'Babel',\n+      },\n+      {\n+        points: 400,\n+        question:\n+          'React uses a _____________ to limit direct manipulation of the DOM and improve performance',\n+        answer: 'Virtual DOM',\n+      },\n+    ],\n+  },\n+  {\n+    category: 'React 201',\n+    questions: [\n+      {\n+        points: 100,\n+        question:\n+          \"<p>Where can you define a component's initial state when you use the ES6 Class syntax?</p><ol><li>getInitialState()</li><li>getInitialProps()</li><li>The component's constructor</li></ol>\",\n+        answer: \"C. The component's constructor\",\n+      },\n+      {\n+        points: 200,\n+        question:\n+          \"Using npm, which package should you require/import in addition to 'react' to render a React component in an existing DOM element of your HTML file?\",\n+        answer: 'react-dom',\n+      },\n+      {\n+        points: 300,\n+        question:\n+          '<p>Which lifecycle function should you use to set default property values?</p><ol><li>getInitialState</li><li>getInitialProps</li><li>getDefaultProps</li></ol>',\n+        answer: 'C. getDefaultProps',\n+      },\n+      {\n+        points: 400,\n+        question:\n+          'Which lifecycle method is invoked once, immediately after the initial rendering occurs?',\n+        answer: 'componentDidMount',\n+      },\n+    ],\n+  },\n+  {\n+    category: 'ES 2015',\n+    questions: [\n+      {\n+        points: 100,\n+        question:\n+          '<p>Constants (const) are:</p><ol><li>Block scoped</li><li>Function scoped</li><li>Global</li></ol>',\n+        answer: 'A. Block scoped',\n+      },\n+      {\n+        points: 200,\n+        question: 'Name 3 new collection classes in ES2015',\n+        answer:\n+          '<ul><li>Map</li><li>WeakMap</li><li>Set</li><li>WeakSet</li></ul>',\n+      },\n+      {\n+        points: 300,\n+        question:\n+          \"<p>What's being logged and how is this new ES6 feature called?</p><code>var colors = ['red', 'blue', 'green'];<br/>var [primary, secondary, tertiary] = colors;<br/>console.log(secondary);</code>\",\n+        answer: '<ul><li>blue</li><li>Array destructuring</li></ul>',\n+      },\n+      {\n+        points: 400,\n+        question:\n+          \"<p>What's being logged and name 4 new features of ES6 used in this code snippet?</p><code>let greeting = (name, msg='Hello') => `${msg}, ${name}`;<br/>console.log(greeting('Christophe');</code>\",","path":"backend/trivia-server.js","position":103,"original_position":103,"commit_id":"d010c85b4b66ed68048d49e28038e321ae609429","original_commit_id":"d010c85b4b66ed68048d49e28038e321ae609429","user":{"login":"rylandg","id":27736122,"node_id":"MDQ6VXNlcjI3NzM2MTIy","avatar_url":"https://avatars0.githubusercontent.com/u/27736122?v=4","gravatar_id":"","url":"https://api.github.com/users/rylandg","html_url":"https://github.com/rylandg","followers_url":"https://api.github.com/users/rylandg/followers","following_url":"https://api.github.com/users/rylandg/following{/other_user}","gists_url":"https://api.github.com/users/rylandg/gists{/gist_id}","starred_url":"https://api.github.com/users/rylandg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rylandg/subscriptions","organizations_url":"https://api.github.com/users/rylandg/orgs","repos_url":"https://api.github.com/users/rylandg/repos","events_url":"https://api.github.com/users/rylandg/events{/privacy}","received_events_url":"https://api.github.com/users/rylandg/received_events","type":"User","site_admin":false},"body":"Did you mean `Christopher` instead of `Christophe`?","created_at":"2019-10-07T21:22:34Z","updated_at":"2019-10-07T21:32:59Z","html_url":"https://github.com/reshufflehq/trivia/pull/1#discussion_r332242910","pull_request_url":"https://api.github.com/repos/reshufflehq/trivia/pulls/1","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/comments/332242910"},"html":{"href":"https://github.com/reshufflehq/trivia/pull/1#discussion_r332242910"},"pull_request":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/reshufflehq/trivia/pulls/1","id":325478028,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI1NDc4MDI4","html_url":"https://github.com/reshufflehq/trivia/pull/1","diff_url":"https://github.com/reshufflehq/trivia/pull/1.diff","patch_url":"https://github.com/reshufflehq/trivia/pull/1.patch","issue_url":"https://api.github.com/repos/reshufflehq/trivia/issues/1","number":1,"state":"open","locked":false,"title":"trivia template","user":{"login":"zolga","id":8036628,"node_id":"MDQ6VXNlcjgwMzY2Mjg=","avatar_url":"https://avatars0.githubusercontent.com/u/8036628?v=4","gravatar_id":"","url":"https://api.github.com/users/zolga","html_url":"https://github.com/zolga","followers_url":"https://api.github.com/users/zolga/followers","following_url":"https://api.github.com/users/zolga/following{/other_user}","gists_url":"https://api.github.com/users/zolga/gists{/gist_id}","starred_url":"https://api.github.com/users/zolga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zolga/subscriptions","organizations_url":"https://api.github.com/users/zolga/orgs","repos_url":"https://api.github.com/users/zolga/repos","events_url":"https://api.github.com/users/zolga/events{/privacy}","received_events_url":"https://api.github.com/users/zolga/received_events","type":"User","site_admin":false},"body":"Trivia template with questions display in flipping cards,  the front card will include the question and the answer is in the back.\r\ntrivia data is initials via backend const because there is no way from the ui to add questions (maybe will be added in the future).\r\n\r\ntested manually locally and via [deploy link](https://vivacious-panda-02.reshuffle.app/)\r\n\r\nplease see the issues tab for the open tasks/bugs.\r\n\r\nThanks!","created_at":"2019-10-07T20:23:42Z","updated_at":"2019-10-07T21:32:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"343ea5ca19a41a38813c4bc07075906f37aefcad","assignee":null,"assignees":[],"requested_reviewers":[{"login":"duckranger","id":2087890,"node_id":"MDQ6VXNlcjIwODc4OTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2087890?v=4","gravatar_id":"","url":"https://api.github.com/users/duckranger","html_url":"https://github.com/duckranger","followers_url":"https://api.github.com/users/duckranger/followers","following_url":"https://api.github.com/users/duckranger/following{/other_user}","gists_url":"https://api.github.com/users/duckranger/gists{/gist_id}","starred_url":"https://api.github.com/users/duckranger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckranger/subscriptions","organizations_url":"https://api.github.com/users/duckranger/orgs","repos_url":"https://api.github.com/users/duckranger/repos","events_url":"https://api.github.com/users/duckranger/events{/privacy}","received_events_url":"https://api.github.com/users/duckranger/received_events","type":"User","site_admin":false},{"login":"michaeladda","id":23503072,"node_id":"MDQ6VXNlcjIzNTAzMDcy","avatar_url":"https://avatars1.githubusercontent.com/u/23503072?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeladda","html_url":"https://github.com/michaeladda","followers_url":"https://api.github.com/users/michaeladda/followers","following_url":"https://api.github.com/users/michaeladda/following{/other_user}","gists_url":"https://api.github.com/users/michaeladda/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeladda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeladda/subscriptions","organizations_url":"https://api.github.com/users/michaeladda/orgs","repos_url":"https://api.github.com/users/michaeladda/repos","events_url":"https://api.github.com/users/michaeladda/events{/privacy}","received_events_url":"https://api.github.com/users/michaeladda/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/reshufflehq/trivia/pulls/1/commits","review_comments_url":"https://api.github.com/repos/reshufflehq/trivia/pulls/1/comments","review_comment_url":"https://api.github.com/repos/reshufflehq/trivia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reshufflehq/trivia/issues/1/comments","statuses_url":"https://api.github.com/repos/reshufflehq/trivia/statuses/d010c85b4b66ed68048d49e28038e321ae609429","head":{"label":"reshufflehq:initial-work","ref":"initial-work","sha":"d010c85b4b66ed68048d49e28038e321ae609429","user":{"login":"reshufflehq","id":53916579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTE2NTc5","avatar_url":"https://avatars1.githubusercontent.com/u/53916579?v=4","gravatar_id":"","url":"https://api.github.com/users/reshufflehq","html_url":"https://github.com/reshufflehq","followers_url":"https://api.github.com/users/reshufflehq/followers","following_url":"https://api.github.com/users/reshufflehq/following{/other_user}","gists_url":"https://api.github.com/users/reshufflehq/gists{/gist_id}","starred_url":"https://api.github.com/users/reshufflehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshufflehq/subscriptions","organizations_url":"https://api.github.com/users/reshufflehq/orgs","repos_url":"https://api.github.com/users/reshufflehq/repos","events_url":"https://api.github.com/users/reshufflehq/events{/privacy}","received_events_url":"https://api.github.com/users/reshufflehq/received_events","type":"Organization","site_admin":false},"repo":{"id":212676589,"node_id":"MDEwOlJlcG9zaXRvcnkyMTI2NzY1ODk=","name":"trivia","full_name":"reshufflehq/trivia","private":false,"owner":{"login":"reshufflehq","id":53916579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTE2NTc5","avatar_url":"https://avatars1.githubusercontent.com/u/53916579?v=4","gravatar_id":"","url":"https://api.github.com/users/reshufflehq","html_url":"https://github.com/reshufflehq","followers_url":"https://api.github.com/users/reshufflehq/followers","following_url":"https://api.github.com/users/reshufflehq/following{/other_user}","gists_url":"https://api.github.com/users/reshufflehq/gists{/gist_id}","starred_url":"https://api.github.com/users/reshufflehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshufflehq/subscriptions","organizations_url":"https://api.github.com/users/reshufflehq/orgs","repos_url":"https://api.github.com/users/reshufflehq/repos","events_url":"https://api.github.com/users/reshufflehq/events{/privacy}","received_events_url":"https://api.github.com/users/reshufflehq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/reshufflehq/trivia","description":"Trivia app with flipping cards","fork":false,"url":"https://api.github.com/repos/reshufflehq/trivia","forks_url":"https://api.github.com/repos/reshufflehq/trivia/forks","keys_url":"https://api.github.com/repos/reshufflehq/trivia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reshufflehq/trivia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reshufflehq/trivia/teams","hooks_url":"https://api.github.com/repos/reshufflehq/trivia/hooks","issue_events_url":"https://api.github.com/repos/reshufflehq/trivia/issues/events{/number}","events_url":"https://api.github.com/repos/reshufflehq/trivia/events","assignees_url":"https://api.github.com/repos/reshufflehq/trivia/assignees{/user}","branches_url":"https://api.github.com/repos/reshufflehq/trivia/branches{/branch}","tags_url":"https://api.github.com/repos/reshufflehq/trivia/tags","blobs_url":"https://api.github.com/repos/reshufflehq/trivia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reshufflehq/trivia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reshufflehq/trivia/git/refs{/sha}","trees_url":"https://api.github.com/repos/reshufflehq/trivia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reshufflehq/trivia/statuses/{sha}","languages_url":"https://api.github.com/repos/reshufflehq/trivia/languages","stargazers_url":"https://api.github.com/repos/reshufflehq/trivia/stargazers","contributors_url":"https://api.github.com/repos/reshufflehq/trivia/contributors","subscribers_url":"https://api.github.com/repos/reshufflehq/trivia/subscribers","subscription_url":"https://api.github.com/repos/reshufflehq/trivia/subscription","commits_url":"https://api.github.com/repos/reshufflehq/trivia/commits{/sha}","git_commits_url":"https://api.github.com/repos/reshufflehq/trivia/git/commits{/sha}","comments_url":"https://api.github.com/repos/reshufflehq/trivia/comments{/number}","issue_comment_url":"https://api.github.com/repos/reshufflehq/trivia/issues/comments{/number}","contents_url":"https://api.github.com/repos/reshufflehq/trivia/contents/{+path}","compare_url":"https://api.github.com/repos/reshufflehq/trivia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reshufflehq/trivia/merges","archive_url":"https://api.github.com/repos/reshufflehq/trivia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reshufflehq/trivia/downloads","issues_url":"https://api.github.com/repos/reshufflehq/trivia/issues{/number}","pulls_url":"https://api.github.com/repos/reshufflehq/trivia/pulls{/number}","milestones_url":"https://api.github.com/repos/reshufflehq/trivia/milestones{/number}","notifications_url":"https://api.github.com/repos/reshufflehq/trivia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reshufflehq/trivia/labels{/name}","releases_url":"https://api.github.com/repos/reshufflehq/trivia/releases{/id}","deployments_url":"https://api.github.com/repos/reshufflehq/trivia/deployments","created_at":"2019-10-03T20:44:49Z","updated_at":"2019-10-03T20:44:53Z","pushed_at":"2019-10-07T20:23:43Z","git_url":"git://github.com/reshufflehq/trivia.git","ssh_url":"git@github.com:reshufflehq/trivia.git","clone_url":"https://github.com/reshufflehq/trivia.git","svn_url":"https://github.com/reshufflehq/trivia","homepage":null,"size":810,"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,"disabled":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"reshufflehq:master","ref":"master","sha":"71ddefbaf5d5ed7760676766c9fea680ebd1afa9","user":{"login":"reshufflehq","id":53916579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTE2NTc5","avatar_url":"https://avatars1.githubusercontent.com/u/53916579?v=4","gravatar_id":"","url":"https://api.github.com/users/reshufflehq","html_url":"https://github.com/reshufflehq","followers_url":"https://api.github.com/users/reshufflehq/followers","following_url":"https://api.github.com/users/reshufflehq/following{/other_user}","gists_url":"https://api.github.com/users/reshufflehq/gists{/gist_id}","starred_url":"https://api.github.com/users/reshufflehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshufflehq/subscriptions","organizations_url":"https://api.github.com/users/reshufflehq/orgs","repos_url":"https://api.github.com/users/reshufflehq/repos","events_url":"https://api.github.com/users/reshufflehq/events{/privacy}","received_events_url":"https://api.github.com/users/reshufflehq/received_events","type":"Organization","site_admin":false},"repo":{"id":212676589,"node_id":"MDEwOlJlcG9zaXRvcnkyMTI2NzY1ODk=","name":"trivia","full_name":"reshufflehq/trivia","private":false,"owner":{"login":"reshufflehq","id":53916579,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTE2NTc5","avatar_url":"https://avatars1.githubusercontent.com/u/53916579?v=4","gravatar_id":"","url":"https://api.github.com/users/reshufflehq","html_url":"https://github.com/reshufflehq","followers_url":"https://api.github.com/users/reshufflehq/followers","following_url":"https://api.github.com/users/reshufflehq/following{/other_user}","gists_url":"https://api.github.com/users/reshufflehq/gists{/gist_id}","starred_url":"https://api.github.com/users/reshufflehq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reshufflehq/subscriptions","organizations_url":"https://api.github.com/users/reshufflehq/orgs","repos_url":"https://api.github.com/users/reshufflehq/repos","events_url":"https://api.github.com/users/reshufflehq/events{/privacy}","received_events_url":"https://api.github.com/users/reshufflehq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/reshufflehq/trivia","description":"Trivia app with flipping cards","fork":false,"url":"https://api.github.com/repos/reshufflehq/trivia","forks_url":"https://api.github.com/repos/reshufflehq/trivia/forks","keys_url":"https://api.github.com/repos/reshufflehq/trivia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reshufflehq/trivia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reshufflehq/trivia/teams","hooks_url":"https://api.github.com/repos/reshufflehq/trivia/hooks","issue_events_url":"https://api.github.com/repos/reshufflehq/trivia/issues/events{/number}","events_url":"https://api.github.com/repos/reshufflehq/trivia/events","assignees_url":"https://api.github.com/repos/reshufflehq/trivia/assignees{/user}","branches_url":"https://api.github.com/repos/reshufflehq/trivia/branches{/branch}","tags_url":"https://api.github.com/repos/reshufflehq/trivia/tags","blobs_url":"https://api.github.com/repos/reshufflehq/trivia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reshufflehq/trivia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reshufflehq/trivia/git/refs{/sha}","trees_url":"https://api.github.com/repos/reshufflehq/trivia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reshufflehq/trivia/statuses/{sha}","languages_url":"https://api.github.com/repos/reshufflehq/trivia/languages","stargazers_url":"https://api.github.com/repos/reshufflehq/trivia/stargazers","contributors_url":"https://api.github.com/repos/reshufflehq/trivia/contributors","subscribers_url":"https://api.github.com/repos/reshufflehq/trivia/subscribers","subscription_url":"https://api.github.com/repos/reshufflehq/trivia/subscription","commits_url":"https://api.github.com/repos/reshufflehq/trivia/commits{/sha}","git_commits_url":"https://api.github.com/repos/reshufflehq/trivia/git/commits{/sha}","comments_url":"https://api.github.com/repos/reshufflehq/trivia/comments{/number}","issue_comment_url":"https://api.github.com/repos/reshufflehq/trivia/issues/comments{/number}","contents_url":"https://api.github.com/repos/reshufflehq/trivia/contents/{+path}","compare_url":"https://api.github.com/repos/reshufflehq/trivia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reshufflehq/trivia/merges","archive_url":"https://api.github.com/repos/reshufflehq/trivia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reshufflehq/trivia/downloads","issues_url":"https://api.github.com/repos/reshufflehq/trivia/issues{/number}","pulls_url":"https://api.github.com/repos/reshufflehq/trivia/pulls{/number}","milestones_url":"https://api.github.com/repos/reshufflehq/trivia/milestones{/number}","notifications_url":"https://api.github.com/repos/reshufflehq/trivia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reshufflehq/trivia/labels{/name}","releases_url":"https://api.github.com/repos/reshufflehq/trivia/releases{/id}","deployments_url":"https://api.github.com/repos/reshufflehq/trivia/deployments","created_at":"2019-10-03T20:44:49Z","updated_at":"2019-10-03T20:44:53Z","pushed_at":"2019-10-07T20:23:43Z","git_url":"git://github.com/reshufflehq/trivia.git","ssh_url":"git@github.com:reshufflehq/trivia.git","clone_url":"https://github.com/reshufflehq/trivia.git","svn_url":"https://github.com/reshufflehq/trivia","homepage":null,"size":810,"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,"disabled":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/1"},"html":{"href":"https://github.com/reshufflehq/trivia/pull/1"},"issue":{"href":"https://api.github.com/repos/reshufflehq/trivia/issues/1"},"comments":{"href":"https://api.github.com/repos/reshufflehq/trivia/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reshufflehq/trivia/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/reshufflehq/trivia/statuses/d010c85b4b66ed68048d49e28038e321ae609429"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rylandg"}}