summaryrefslogtreecommitdiff
path: root/scraper/client/paper/paper.verify.js
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/client/paper/paper.verify.js')
-rw-r--r--scraper/client/paper/paper.verify.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js
index 8cb14d84..98692588 100644
--- a/scraper/client/paper/paper.verify.js
+++ b/scraper/client/paper/paper.verify.js
@@ -99,6 +99,24 @@ class PaperVerify extends Component {
this.next(false)
}
+ prev() {
+ const { key } = this.props.api.paperInfo.dataset
+ const { paperInfo } = this.props.api
+ let citationIndex = (paperInfo.citations || [])
+ .findIndex(f => f.id === this.state.citation.id)
+ if (citationIndex === -1) {
+ history.push('/paper/' + key + '/info/')
+ } else {
+ citationIndex -= 1
+ if (citationIndex < 0) {
+ history.push('/paper/' + key + '/info/')
+ } else {
+ let nextId = paperInfo.citations[citationIndex].id
+ history.push('/paper/' + key + '/verify/' + nextId)
+ }
+ }
+ }
+
next() {
const { key } = this.props.api.paperInfo.dataset
const { paperInfo } = this.props.api
@@ -228,6 +246,11 @@ class PaperVerify extends Component {
<button
className='btn'
+ onClick={this.prev.bind(this)}
+ >{'Prev >'}</button>
+
+ <button
+ className='btn'
onClick={this.next.bind(this)}
>{'Next >'}</button>
</div>