Skip to content

Commit

Permalink
don't show children stats for genus page
Browse files Browse the repository at this point in the history
  • Loading branch information
Goran Sterjov committed Jan 31, 2024
1 parent c354ee7 commit 9ef336f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/(taxonomy)/[rank]/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -678,21 +678,27 @@ function DataSummary({ rank, taxon }: { rank: string, taxon: Taxonomy | undefine
<Title order={5}>Taxonomic breakdown</Title>

<DataTable my={8}>
{ rank !== 'GENUS' &&
<DataTableRow label={`Number of ${childTaxonLabel}`}>
<DataField value={taxon?.descendants.length}></DataField>
</DataTableRow>
}
<DataTableRow label="Number of species/OTUs">
<DataField value={Humanize.formatNumber(taxon?.summary.species || 0)} />
</DataTableRow>
{ rank !== 'GENUS' &&
<DataTableRow label={`${Humanize.capitalize(childTaxonLabel)} with genomes`}>
<DataField value={Humanize.formatNumber(taxon?.descendants.filter(d => d.speciesGenomes > 0).length || 0)} />
</DataTableRow>
}
<DataTableRow label="Species with genomes">
<DataField value={Humanize.formatNumber(taxon?.summary.speciesGenomes || 0)} />
</DataTableRow>
{ rank !== 'GENUS' &&
<DataTableRow label={`${Humanize.capitalize(childTaxonLabel)} with data`}>
<DataField value={Humanize.formatNumber(taxon?.descendants.filter(d => d.speciesData > 0).length || 0)} />
</DataTableRow>
}
<DataTableRow label="Species with data">
<DataField value={Humanize.formatNumber(taxon?.summary.speciesData || 0)} />
</DataTableRow>
Expand Down

0 comments on commit 9ef336f

Please sign in to comment.