Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix/WC-123: Filter citation authors to remove those with authorship=false #1453

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading