summaryrefslogtreecommitdiff
path: root/scraper/client/paper
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/client/paper')
-rw-r--r--scraper/client/paper/paper.info.js9
-rw-r--r--scraper/client/paper/paper.verify.js11
2 files changed, 13 insertions, 7 deletions
diff --git a/scraper/client/paper/paper.info.js b/scraper/client/paper/paper.info.js
index 35234617..b4fe54ba 100644
--- a/scraper/client/paper/paper.info.js
+++ b/scraper/client/paper/paper.info.js
@@ -9,7 +9,7 @@ import { TableObject } from '../common'
class PaperInfo extends Component {
render() {
const { paperInfo, unknownCitations } = this.props.api
- const { dataset, address } = paperInfo
+ const { dataset, paper, address } = paperInfo
if (!dataset) return null
return (
<div className='paperInfo'>
@@ -17,7 +17,12 @@ class PaperInfo extends Component {
<TableObject summary
tag="Dataset"
object={dataset}
- order={['key', 'name_full', 'relevance', 'subset_of', 'superset_of']}
+ order={'key name_full purpose comment created_by funded_by funded_by_short license'.split(' ')}
+ />
+ <TableObject summary
+ tag="Paper"
+ object={paper}
+ order={"paper_id title year doi address".split(" ")}
/>
<TableObject summary
tag="Statistics"
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js
index fcebac02..25117ff1 100644
--- a/scraper/client/paper/paper.verify.js
+++ b/scraper/client/paper/paper.verify.js
@@ -52,7 +52,7 @@ class PaperVerify extends Component {
let newState = {}
if (oldSha256 && sha256 !== oldSha256) {
- console.log('update verification')
+ // console.log('update verification')
this.props.actions.getAddress(sha256)
this.props.actions.getVerification(sha256)
const citationState = this.getCitationState(sha256)
@@ -60,7 +60,7 @@ class PaperVerify extends Component {
...initialState,
...citationState,
...address.paper,
- pdfIndex: citationState.citations.pdf.findIndex(el => el.pdf.match(/^http:/)),
+ pdfIndex: citationState.citation.pdf.findIndex(el => el.match(/^https:/)),
}
this.setState(newState)
} else if (verify && !verify.loading && verify.paper && (!oldPaper || oldPaper !== verify.paper)) {
@@ -71,7 +71,7 @@ class PaperVerify extends Component {
...initialState,
...citationState,
...address.paper,
- pdfIndex: citationState.citations.pdf.findIndex(el => el.pdf.match(/^http:/)),
+ pdfIndex: citationState.citation.pdf.findIndex(el => el.match(/^https:/)),
}
this.setState(newState)
} else {
@@ -81,7 +81,7 @@ class PaperVerify extends Component {
newState = {
...citationState,
...address.paper,
- pdfIndex: citationState.citations.pdf.findIndex(el => el.pdf.match(/^http:/)),
+ pdfIndex: citationState.citation.pdf.findIndex(el => el.match(/^https:/)),
uses_dataset: paper.uses_dataset,
images_in_paper: paper.images_in_paper,
verified_by: paper.verified_by,
@@ -170,7 +170,8 @@ class PaperVerify extends Component {
const { paperInfo, sortedCitations } = this.props.api
const citations = sortedCitations || paperInfo.citations || []
let citationIndex = citations.findIndex(f => f.id === this.state.citation.id)
-
+ console.log(sortedCitations)
+ console.log('going to next', key, citationIndex)
if (citationIndex === -1) {
history.push('/paper/' + key + '/info/')
} else {