Skip to content

Commit

Permalink
UIIN-2478 De-dup holdingsRecordIds fetched (#2200)
Browse files Browse the repository at this point in the history
(cherry picked from commit 05c58a0)
  • Loading branch information
maccabeelevine authored and zburke committed Jul 10, 2023
1 parent eb9118e commit 5877f65
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import useChunkedCQLFetch from '../../../hooks/useChunkedCQLFetch';

const useBoundWithHoldings = (boundWithItems) => {
const holdingsRecordIds = boundWithItems?.map(x => x.holdingsRecordId);
let holdingsRecordIds = boundWithItems?.map(x => x.holdingsRecordId);

// De-dup the list of holdingsRecordIds for efficiency
holdingsRecordIds = [...new Set(holdingsRecordIds)];

const { items: holdingsRecords, isLoading } = useChunkedCQLFetch({
ids: holdingsRecordIds,
Expand Down

0 comments on commit 5877f65

Please sign in to comment.