diff options
| author | adamhrv <adam@ahprojects.com> | 2019-04-03 23:24:12 +0200 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-04-03 23:24:12 +0200 |
| commit | 7d2043eb24cd171e809d83219e543ce9541ba821 (patch) | |
| tree | c415aae6c682093b18052d622fd201e983e18fd1 /scraper/client/paper/paper.verify.js | |
| parent | 2db426422eedc4847618f972b02189f3d49fe03a (diff) | |
| parent | 24e4f4af71f1e146f33688822ac3e4242339faa4 (diff) | |
Merge branch 'master' of github.com:adamhrv/megapixels_dev
Diffstat (limited to 'scraper/client/paper/paper.verify.js')
| -rw-r--r-- | scraper/client/paper/paper.verify.js | 10 |
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, |
