Skip to content

Commit

Permalink
Hide annotator taxonomies on cite page
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcnulty committed Dec 16, 2024
1 parent 4c00902 commit 27e5cdc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions site/gatsby-site/src/templates/citeTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ function CiteTemplate({
},
});

const visibleClassifications = {
nodes: allMongodbAiidprodClassifications.nodes.filter(
(classification) => !classification.namespace.includes('_Annotator')
),
};

// meta tags

const defaultIncidentTitle = t('Citation record for Incident {{id}}', {
Expand Down Expand Up @@ -295,13 +301,10 @@ function CiteTemplate({
reportCount: sortedReports.length,
incidentDate: incident.date,
taxonomiesWithClassifications: Array.from(
allMongodbAiidprodClassifications.nodes.reduce(
(namespaces, classification) => {
namespaces.add(classification.namespace);
return namespaces;
},
new Set()
)
visibleClassifications.nodes.reduce((namespaces, classification) => {
namespaces.add(classification.namespace);
return namespaces;
}, new Set())
),
editors: incident.editors
.filter((editor) => editor && editor.first_name && editor.last_name)
Expand All @@ -322,7 +325,7 @@ function CiteTemplate({
/>
)}
<ClassificationsDisplay
classifications={allMongodbAiidprodClassifications}
classifications={visibleClassifications}
taxa={allMongodbAiidprodTaxa}
/>
</Col>
Expand Down

0 comments on commit 27e5cdc

Please sign in to comment.