summaryrefslogtreecommitdiff
path: root/scraper/client/paper/paper.verify.js
diff options
context:
space:
mode:
authorAdam Harvey <adam@ahprojects.com>2019-04-03 14:35:41 +0200
committerAdam Harvey <adam@ahprojects.com>2019-04-03 14:35:41 +0200
commit0224090a9dcc79de897871cfa573f99cf8f005a5 (patch)
treeec5967fa3d6ca197af1ac12092fe168fdf499d48 /scraper/client/paper/paper.verify.js
parent04677d60e9e867a6d02fa2c99f07f83dff6e6005 (diff)
parentdf707e4316c79375499974fb2a3443f1c049b93c (diff)
.
Diffstat (limited to 'scraper/client/paper/paper.verify.js')
-rw-r--r--scraper/client/paper/paper.verify.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js
index 25117ff1..813abb6d 100644
--- a/scraper/client/paper/paper.verify.js
+++ b/scraper/client/paper/paper.verify.js
@@ -36,7 +36,9 @@ class PaperVerify extends Component {
const { sha256 } = this.props.match.params
this.props.actions.getInstitutions()
this.props.actions.getAddress(sha256)
- this.props.actions.getVerification(sha256)
+ if (this.props.api.paperInfo.dataset) {
+ this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
+ }
const citationState = this.getCitationState(sha256)
// console.log('DID MOUNT')
this.setState(citationState)
@@ -51,10 +53,14 @@ class PaperVerify extends Component {
const paper = verify ? verify.paper : null
let newState = {}
+ if (this.props.api.paperInfo.dataset !== oldProps.api.paperInfo.dataset) {
+ this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
+ }
+
if (oldSha256 && sha256 !== oldSha256) {
// console.log('update verification')
this.props.actions.getAddress(sha256)
- this.props.actions.getVerification(sha256)
+ this.props.actions.getVerification(this.props.api.paperInfo.dataset.key, sha256)
const citationState = this.getCitationState(sha256)
newState = {
...initialState,