Skip to content

Commit

Permalink
filter citation authors to remove those with authorship=false (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarosenb authored Oct 1, 2024
1 parent 56b7608 commit 06a068a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const ProjectCitation: React.FC<{
const { data } = useProjectDetail(projectId);
const entityDetails = data?.entities.find((e) => e.uuid === entityUuid);
const authors =
entityDetails?.value.authors?.filter((a) => a.fname && a.lname) ?? [];
entityDetails?.value.authors?.filter(
(a) => a.fname && a.lname && a.authorship !== false
) ?? [];
if (!data || !entityDetails) return null;
return (
<div>
Expand Down Expand Up @@ -44,7 +46,8 @@ export const PublishedCitation: React.FC<{
(child) => child.uuid === entityUuid && child.version === version
);

const authors = entityDetails?.value.authors ?? [];
const authors =
entityDetails?.value.authors?.filter((a) => a.authorship !== false) ?? [];
if (!data || !entityDetails) return null;

const doi =
Expand Down

0 comments on commit 06a068a

Please sign in to comment.