Skip to content

Commit

Permalink
Merge pull request #154 from lucyjemutai/imaging
Browse files Browse the repository at this point in the history
ensure we display 0 and not NaN
  • Loading branch information
lucyjemutai authored Nov 29, 2024
2 parents 4cba2d5 + 8591256 commit 5ad29ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pages/orgs/[org]/domains/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ function OrgDomainsList() {
<span className='text-stone-500'>Mappings:</span> <span style={{ fontWeight: '500', color: 'black' }}>{new Intl.NumberFormat().format(domain.sources_data[0]?.summary?.active_mappings) || 0}</span>
</Box> */}
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 1, fontSize: '0.9em', mx: 1, mb: 1 }}>
<span className='text-stone-500'>Concepts:</span> <span style={{ fontWeight: '500', color: 'black' }}>{new Intl.NumberFormat().format(domain.sources_data[0]?.summary?.active_concepts) || 0}</span>
<span className="text-stone-500">Concepts:</span>
<span style={{ fontWeight: '500', color: 'black' }}>
{Number.isFinite(domain.sources_data[0]?.summary?.active_concepts)
? new Intl.NumberFormat().format(
domain.sources_data[0]?.summary?.active_concepts
)
: 0}
</span>
</Box>
</Box> : <Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 1, width: '100%', fontSize: '0.8em' }}>
<span style={{ fontWeight: '500' }}>&nbsp;</span>
Expand Down

0 comments on commit 5ad29ff

Please sign in to comment.