Skip to content

Commit

Permalink
chore: format numerical stats with commas
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekep-Obasi committed Oct 29, 2024
1 parent 7850207 commit 3b1b108
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Stats/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { noop } from 'lodash'
import { useEffect, useState } from 'react'
import styled from 'styled-components'
import { Icons } from '~/components/Icons'
import BudgetIcon from '~/components/Icons/BudgetIcon'
import NodesIcon from '~/components/Icons/NodesIcon'
import { Tooltip } from '~/components/common/ToolTip'
import { getStats, getTotalProcessing } from '~/network/fetchSourcesData'
import { useDataStore } from '~/stores/useDataStore'
import { useUpdateSelectedNode } from '~/stores/useGraphStore'
import { useModal } from '~/stores/useModalStore'
import { useSchemaStore } from '~/stores/useSchemaStore'
import { useUserStore } from '~/stores/useUserStore'
import { TStats } from '~/types'
import { formatBudget, formatStatsResponse } from '~/utils'
import { formatBudget, formatNumberWithCommas, formatStatsResponse } from '~/utils'
import { colors } from '~/utils/colors'
import { Flex } from '../common/Flex'
import { Animation } from './Animation'
import { Icons } from '~/components/Icons'
import { useSchemaStore } from '~/stores/useSchemaStore'

export const Stats = () => {
const [isTotalProcessing, setIsTotalProcessing] = useState(false)
Expand Down Expand Up @@ -119,7 +119,7 @@ export const Stats = () => {
<div className="icon">
<Icon />
</div>
<div className="text">{stats[key as keyof TStats]}</div>
<div className="text">{formatNumberWithCommas(stats[key as keyof TStats] ?? 0)}</div>
</Tooltip>
</Stat>
) : (
Expand Down

0 comments on commit 3b1b108

Please sign in to comment.