Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2016 +/- ##
========================================
Coverage 96.71% 96.71%
========================================
Files 221 221
Lines 31672 31689 +17
Branches 4785 4789 +4
========================================
+ Hits 30631 30648 +17
- Misses 1036 1037 +1
+ Partials 5 4 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
louise-davies
left a comment
There was a problem hiding this comment.
Works well, just a comment on simplifying the code using map instead of reduce
| const funders = | ||
| dataciteData?.attributes.fundingReferences.reduce( | ||
| (result: string[], element) => { | ||
| result.push(element.funderName); | ||
| return result; | ||
| }, | ||
| [] | ||
| ) ?? []; |
There was a problem hiding this comment.
This is not necessary, the techniques, samples and subjects need to use .reduce() as it's splitting the items up into three different arrays in one pass. Here we're just extracting out the funderNames from an array, so .map() is more appropriate, e.g. dataciteData?.attributes.fundingReferences.map((fr) => fr.funderName).
Description
Display FundingReference information on DLS DOI landing pages
Testing instructions
Agile board tracking
closes #2012