Skip to content

Commit

Permalink
Atlas #4 - Updating RelatedItem component to only display count for f…
Browse files Browse the repository at this point in the history
…inite values
  • Loading branch information
dleadbetter committed Apr 2, 2024
1 parent d8a8dbd commit 599a6cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core-data/src/components/RelatedItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as Accordion from '@radix-ui/react-accordion';
import { AlertCircle, ChevronDown } from 'lucide-react';
import React, { type Node } from 'react';
import _ from 'underscore';
import i18n from '../i18n/i18n';
import LoadAnimation from './LoadAnimation';

Expand Down Expand Up @@ -31,7 +32,7 @@ const RelatedItemsList = (props: Props) => (
>
<div>
{ props.label }
{ props.count && (
{ _.isFinite(props.count) && (
<span className='ml-1'>
{ i18n.t('RelatedItemsList.labels.count', { count: props.count })}
</span>
Expand Down

0 comments on commit 599a6cf

Please sign in to comment.