Skip to content

Commit

Permalink
Treat accessions and urls as special node traits
Browse files Browse the repository at this point in the history
The schema defines these as "special" property, and we use them to render the value and link to be rendered via `<AccessionAndUrl>` within the tip-clicked panel.

These should not be available as valid traits for general display.
  • Loading branch information
jameshadfield committed Mar 18, 2021
1 parent e96d002 commit d7091fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/tree/infoPanels/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const SampleDate = ({node, t}) => {
const getTraitsToDisplay = (node) => {
// TODO -- this should be centralised somewhere
if (!node.node_attrs) return [];
const ignore = ["author", "div", "num_date", "gisaid_epi_isl", "genbank_accession"];
const ignore = ["author", "div", "num_date", "gisaid_epi_isl", "genbank_accession", "accession", "url"];
return Object.keys(node.node_attrs).filter((k) => !ignore.includes(k));
};

Expand Down

0 comments on commit d7091fc

Please sign in to comment.