From 599a6cfb95bb454136ae6fbf40fb7230b047d4db Mon Sep 17 00:00:00 2001 From: dleadbetter <> Date: Tue, 2 Apr 2024 14:09:30 -0400 Subject: [PATCH] Atlas #4 - Updating RelatedItem component to only display count for finite values --- packages/core-data/src/components/RelatedItem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core-data/src/components/RelatedItem.js b/packages/core-data/src/components/RelatedItem.js index ef7697cc..8bb9f34a 100644 --- a/packages/core-data/src/components/RelatedItem.js +++ b/packages/core-data/src/components/RelatedItem.js @@ -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'; @@ -31,7 +32,7 @@ const RelatedItemsList = (props: Props) => ( >
{ props.label } - { props.count && ( + { _.isFinite(props.count) && ( { i18n.t('RelatedItemsList.labels.count', { count: props.count })}