Skip to content

Commit

Permalink
Merge pull request #569 from NASA-IMPACT/fix/remove-reviewer_info
Browse files Browse the repository at this point in the history
Remove reviewer info in the PDFs
  • Loading branch information
wrynearson authored Dec 14, 2023
2 parents fe57369 + 1b39259 commit bc1eb3c
Showing 1 changed file with 2 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1076,8 +1076,9 @@ const htmlAtbdContentSections = [
{
label: 'Reviewer Information',
id: 'reviewer_info',
shouldRender: ({ atbd }) => {
shouldRender: ({ atbd, printMode }) => {
if (!atbd) return false;
if (printMode) return false; // Should not render in the PDF preview

// Render if there are reviewers with the role 'Document Reviewer'
const contactsLink = atbd?.contacts_link || [];
Expand Down Expand Up @@ -1294,43 +1295,6 @@ const pdfAtbdContentSections = [
}));
}
},
{
label: 'Reviewer Information',
id: 'reviewer_info',
shouldRender: ({ atbd }) => {
if (!atbd) return false;

// Render if there are reviewers with the role 'Document Reviewer'
const contactsLink = atbd?.contacts_link || [];

for (const { roles } of contactsLink) {
if (roles.includes('Document Reviewer')) {
return true;
}
}
return false;
},
render: ({ element, atbd, printMode, children }) => {
if (!atbd) {
return null;
}
return (
<AtbdSection
key={element.id}
id={element.id}
title={element.label}
atbd={atbd}
printMode={printMode}
>
{React.Children.count(children) ? (
children
) : (
<p>There are no reviewers associated with this document</p>
)}
</AtbdSection>
);
}
},
{
label: 'References',
id: 'references',
Expand Down

0 comments on commit bc1eb3c

Please sign in to comment.