Make sure hasCostsWithinTimeframe is a boolean

This commit is contained in:
Brenda Sukh
2020-10-21 15:40:11 -04:00
parent cd5a2c63f7
commit 5473236ed4
@@ -51,7 +51,7 @@ const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => {
const dispatchLoadingProduct = useCallback(dispatchLoading, [product.kind]);
const amount = resource?.entities?.length || 0;
const hasCostsWithinTimeframe = resource?.change && amount;
const hasCostsWithinTimeframe = resource?.change && !!amount;
const subheader = amount
? `${amount} ${pluralOf(amount, 'entity', 'entities')}, sorted by cost`