diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-28 16:50:57 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-28 16:50:57 +0100 |
| commit | d13d1cdfa51a481d318fb37cd02ba93915bdc3d1 (patch) | |
| tree | 676a717d2fd861311dfba65a2658dfd138044590 /scraper | |
| parent | a9523182f80649ff4d4e3f6b03bb89c325b1a059 (diff) | |
add pdf length search
Diffstat (limited to 'scraper')
| -rw-r--r-- | scraper/client/paper/citationList.component.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scraper/client/paper/citationList.component.js b/scraper/client/paper/citationList.component.js index 09060375..1443b24c 100644 --- a/scraper/client/paper/citationList.component.js +++ b/scraper/client/paper/citationList.component.js @@ -22,8 +22,13 @@ class CitationList extends Component { <h2>{title}</h2> <ul> {citations - .map(citation => [citation.title, verifiedLookup[citation.id] ? verifiedLookup[citation.id].uses_dataset : USES_DATASET.NO_DATA, citation]) - .sort((a,b) => (b[1] - a[1] || (a[0].localeCompare(b[0])))) + .map(citation => [ + citation.title, + verifiedLookup[citation.id] ? verifiedLookup[citation.id].uses_dataset : USES_DATASET.NO_DATA, + citation.pdf.length, + citation + ]) + .sort((a,b) => (b[2] - a[2] || b[1] - a[1] || (a[0].localeCompare(b[0])))) .map((pair, i) => { const [ title, uses_dataset, citation ] = pair let cite = { ...citation } |
