Skip to content

Commit

Permalink
Handle creators and contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
john-conroy committed Aug 28, 2024
1 parent 8c66769 commit b731d89
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions context/app/static/js/pages/Collection/Collection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ function Collection({ collection: collectionData }) {
last_modified_timestamp,
datasets,
creators,
contributors,
contacts,
} = collectionData;

const doi = getCollectionDOI(doi_url);

useTrackID({ entity_type, hubmap_id });

const possible_contributors = contributors ?? contacts;

return (
<div>
{collectionData && (
Expand All @@ -48,8 +51,8 @@ function Collection({ collection: collectionData }) {
)}
</Summary>
{'datasets' in collectionData && <CollectionDatasetsTable datasets={datasets} />}
{'creators' in collectionData && (
<ContributorsTable contributors={creators} contacts={contacts} title="Contributors" />
{possible_contributors && Boolean(possible_contributors.length) && (
<ContributorsTable contributors={possible_contributors} contacts={contacts} title="Contributors" />
)}
</>
)}
Expand Down

0 comments on commit b731d89

Please sign in to comment.