Fix undefined check and use consistent number formatting function names

This commit is contained in:
Bill Thornton
2025-06-09 15:12:34 -04:00
parent 1c6dac5936
commit 329c878d52
4 changed files with 9 additions and 9 deletions
@@ -7,7 +7,7 @@ import Typography from '@mui/material/Typography';
import React, { type FC } from 'react';
import { useLocale } from 'hooks/useLocale';
import { toLocaleString } from 'utils/number';
import { toDecimalString } from 'utils/number';
interface Metric {
label: string
@@ -54,8 +54,8 @@ const MetricCard: FC<MetricCardProps> = ({
variant='h5'
component='div'
>
{value ? (
toLocaleString(value, dateTimeLocale)
{typeof value !== 'undefined' ? (
toDecimalString(value, dateTimeLocale)
) : (
<Skeleton />
)}