{"action":"created","comment":{"url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/comments/110374192","pull_request_review_id":31543697,"id":110374192,"diff_hunk":"@@ -1,40 +1,68 @@\n import React, { PropTypes } from 'react';\n-import { Link } from 'react-router';\n+import { browserHistory } from 'react-router';\n import { connect } from 'react-redux';\n-import { Card, Button, Modal, Row, Col } from 'react-materialize';\n+import renderHTML from 'react-render-html';\n+import { Card, Button, Modal, Row, Col, Pagination, CardTitle } from 'react-materialize';\n import { getDocHelper, viewDocHelper } from './docActions';\n \n \n class Home extends React.Component {\n   constructor(props) {\n     super(props);\n+    this.state = {\n+      docs: this.props.doc,\n+      limit: 9,\n+      page: 1,\n+      offset: 0\n+    };\n+    this.handlePagination = this.handlePagination.bind(this);\n   }\n \n   componentWillMount() {\n-    this.props.GetDoc();\n+    this.props.GetDoc(this.state.limit, this.state.offset).then(() => {\n+      this.setState({docs: this.props.doc});\n+    });\n+  }\n+\n+  componentWillReceiveProps(next) {\n+    const query = this.props.location.query;\n+    const nextQuery = next.location.query;\n+\n+    const queryChange = query.page !== nextQuery.page || query.limit !== nextQuery.limit;\n+    if (queryChange) {\n+      const pageNumber = nextQuery.page;\n+      const offset = !pageNumber || pageNumber === 1 ? 0 : (pageNumber - 1) * this.state.limit;\n+      this.setState({ page: pageNumber, offset });\n+      this.props.GetDoc(nextQuery.limit, offset).then(() => {\n+        this.setState({ docs: this.props.doc });\n+      });\n+    }\n   }\n \n   getDocs(docArray) {\n-    return docArray.map(docItem => (<Card\n-    key={docItem.id}\n-    title={docItem.title}>\n-      <h5>{docItem.access}</h5>\n-      <p>{docItem.content}</p>\n+    return docArray.map(docItem => (<Col key={docItem.id} s={4}><Card\n+    title={docItem.access}\n+    className=\"small\"\n+    header={<CardTitle image=\"http://lorempixel.com/400/200\">{docItem.title}</CardTitle>}\n+    >\n       <Modal\n-      header={docItem.title} trigger={<Button waves=\"light\">View</Button>}>\n-        <p>{docItem.content}</p>\n+      header={docItem.title} trigger={<Button className=\"base-button right\" waves=\"light\"><i className=\"material-icons\">visibility</i></Button>}>\n+        <p className=\"doc-p\"><hr />{renderHTML(docItem.content)}</p>\n       </Modal>\n-    </Card>));\n+    </Card></Col>));\n+  }\n+\n+  handlePagination(pageNumber) {","path":"client/app/document/index.jsx","position":66,"original_position":66,"commit_id":"00f94919fcc4ee7d0eb9001cb0095b8b50b371c8","original_commit_id":"00f94919fcc4ee7d0eb9001cb0095b8b50b371c8","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Missing JSDoc comment                                 require-jsdoc","created_at":"2017-04-07T12:03:25Z","updated_at":"2017-04-07T12:03:26Z","html_url":"https://github.com/andela-uenyingwa/dms-api/pull/14#discussion_r110374192","pull_request_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/comments/110374192"},"html":{"href":"https://github.com/andela-uenyingwa/dms-api/pull/14#discussion_r110374192"},"pull_request":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14","id":114801692,"html_url":"https://github.com/andela-uenyingwa/dms-api/pull/14","diff_url":"https://github.com/andela-uenyingwa/dms-api/pull/14.diff","patch_url":"https://github.com/andela-uenyingwa/dms-api/pull/14.patch","issue_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/14","number":14,"state":"closed","locked":false,"title":"#143097885/error handling","user":{"login":"andela-uenyingwa","id":24937935,"avatar_url":"https://avatars1.githubusercontent.com/u/24937935?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-uenyingwa","html_url":"https://github.com/andela-uenyingwa","followers_url":"https://api.github.com/users/andela-uenyingwa/followers","following_url":"https://api.github.com/users/andela-uenyingwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-uenyingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-uenyingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-uenyingwa/subscriptions","organizations_url":"https://api.github.com/users/andela-uenyingwa/orgs","repos_url":"https://api.github.com/users/andela-uenyingwa/repos","events_url":"https://api.github.com/users/andela-uenyingwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-uenyingwa/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-07T12:02:21Z","updated_at":"2017-04-07T12:03:26Z","closed_at":"2017-04-07T12:02:40Z","merged_at":"2017-04-07T12:02:40Z","merge_commit_sha":"1df44cb940b9e4fecea8efbe7c19ec0336fe9ec8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14/commits","review_comments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14/comments","review_comment_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/14/comments","statuses_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/statuses/00f94919fcc4ee7d0eb9001cb0095b8b50b371c8","head":{"label":"andela-uenyingwa:feature/143097885/error-handling","ref":"feature/143097885/error-handling","sha":"00f94919fcc4ee7d0eb9001cb0095b8b50b371c8","user":{"login":"andela-uenyingwa","id":24937935,"avatar_url":"https://avatars1.githubusercontent.com/u/24937935?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-uenyingwa","html_url":"https://github.com/andela-uenyingwa","followers_url":"https://api.github.com/users/andela-uenyingwa/followers","following_url":"https://api.github.com/users/andela-uenyingwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-uenyingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-uenyingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-uenyingwa/subscriptions","organizations_url":"https://api.github.com/users/andela-uenyingwa/orgs","repos_url":"https://api.github.com/users/andela-uenyingwa/repos","events_url":"https://api.github.com/users/andela-uenyingwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-uenyingwa/received_events","type":"User","site_admin":false},"repo":{"id":82652974,"name":"dms-api","full_name":"andela-uenyingwa/dms-api","owner":{"login":"andela-uenyingwa","id":24937935,"avatar_url":"https://avatars1.githubusercontent.com/u/24937935?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-uenyingwa","html_url":"https://github.com/andela-uenyingwa","followers_url":"https://api.github.com/users/andela-uenyingwa/followers","following_url":"https://api.github.com/users/andela-uenyingwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-uenyingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-uenyingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-uenyingwa/subscriptions","organizations_url":"https://api.github.com/users/andela-uenyingwa/orgs","repos_url":"https://api.github.com/users/andela-uenyingwa/repos","events_url":"https://api.github.com/users/andela-uenyingwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-uenyingwa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-uenyingwa/dms-api","description":null,"fork":false,"url":"https://api.github.com/repos/andela-uenyingwa/dms-api","forks_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/forks","keys_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/teams","hooks_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/hooks","issue_events_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/events{/number}","events_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/events","assignees_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/assignees{/user}","branches_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/branches{/branch}","tags_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/tags","blobs_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/languages","stargazers_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/stargazers","contributors_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/contributors","subscribers_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/subscribers","subscription_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/subscription","commits_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/contents/{+path}","compare_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/merges","archive_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/downloads","issues_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues{/number}","pulls_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/labels{/name}","releases_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/releases{/id}","deployments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/deployments","created_at":"2017-02-21T08:04:39Z","updated_at":"2017-03-14T14:14:30Z","pushed_at":"2017-04-07T12:02:40Z","git_url":"git://github.com/andela-uenyingwa/dms-api.git","ssh_url":"git@github.com:andela-uenyingwa/dms-api.git","clone_url":"https://github.com/andela-uenyingwa/dms-api.git","svn_url":"https://github.com/andela-uenyingwa/dms-api","homepage":null,"size":23052,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-uenyingwa:develop","ref":"develop","sha":"8637c6944d2890bf2d2c4e58bc843b9fc0622986","user":{"login":"andela-uenyingwa","id":24937935,"avatar_url":"https://avatars1.githubusercontent.com/u/24937935?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-uenyingwa","html_url":"https://github.com/andela-uenyingwa","followers_url":"https://api.github.com/users/andela-uenyingwa/followers","following_url":"https://api.github.com/users/andela-uenyingwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-uenyingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-uenyingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-uenyingwa/subscriptions","organizations_url":"https://api.github.com/users/andela-uenyingwa/orgs","repos_url":"https://api.github.com/users/andela-uenyingwa/repos","events_url":"https://api.github.com/users/andela-uenyingwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-uenyingwa/received_events","type":"User","site_admin":false},"repo":{"id":82652974,"name":"dms-api","full_name":"andela-uenyingwa/dms-api","owner":{"login":"andela-uenyingwa","id":24937935,"avatar_url":"https://avatars1.githubusercontent.com/u/24937935?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-uenyingwa","html_url":"https://github.com/andela-uenyingwa","followers_url":"https://api.github.com/users/andela-uenyingwa/followers","following_url":"https://api.github.com/users/andela-uenyingwa/following{/other_user}","gists_url":"https://api.github.com/users/andela-uenyingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-uenyingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-uenyingwa/subscriptions","organizations_url":"https://api.github.com/users/andela-uenyingwa/orgs","repos_url":"https://api.github.com/users/andela-uenyingwa/repos","events_url":"https://api.github.com/users/andela-uenyingwa/events{/privacy}","received_events_url":"https://api.github.com/users/andela-uenyingwa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-uenyingwa/dms-api","description":null,"fork":false,"url":"https://api.github.com/repos/andela-uenyingwa/dms-api","forks_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/forks","keys_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/teams","hooks_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/hooks","issue_events_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/events{/number}","events_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/events","assignees_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/assignees{/user}","branches_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/branches{/branch}","tags_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/tags","blobs_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/languages","stargazers_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/stargazers","contributors_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/contributors","subscribers_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/subscribers","subscription_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/subscription","commits_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/contents/{+path}","compare_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/merges","archive_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/downloads","issues_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues{/number}","pulls_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/labels{/name}","releases_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/releases{/id}","deployments_url":"https://api.github.com/repos/andela-uenyingwa/dms-api/deployments","created_at":"2017-02-21T08:04:39Z","updated_at":"2017-03-14T14:14:30Z","pushed_at":"2017-04-07T12:02:40Z","git_url":"git://github.com/andela-uenyingwa/dms-api.git","ssh_url":"git@github.com:andela-uenyingwa/dms-api.git","clone_url":"https://github.com/andela-uenyingwa/dms-api.git","svn_url":"https://github.com/andela-uenyingwa/dms-api","homepage":null,"size":23052,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14"},"html":{"href":"https://github.com/andela-uenyingwa/dms-api/pull/14"},"issue":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/14"},"comments":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/andela-uenyingwa/dms-api/statuses/00f94919fcc4ee7d0eb9001cb0095b8b50b371c8"}}}}
{"actor":{"display_login":"houndci-bot"}}