Skip to content

Commit

Permalink
Remove reviewer info in the PDFs
Browse files Browse the repository at this point in the history
Removes the reviewer information for both the journal PDFs and the document
PDF in print mode.
  • Loading branch information
kamicut committed Dec 13, 2023
1 parent fe57369 commit 1b39259
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 1b39259

Please sign in to comment.