11import { type FtmEntityPersonOption , type FtmEntityV2 } from '@app-builder/models/data-model' ;
22import { SCORING_LEVELS_COLORS } from '@app-builder/models/scoring' ;
33import { useDataModel } from '@app-builder/services/data/data-model' ;
4+ import { formatNumber } from '@app-builder/utils/format' ;
45import {
56 BaseEdge ,
67 EdgeLabelRenderer ,
@@ -13,7 +14,7 @@ import {
1314import { type ReactNode , useCallback , useState } from 'react' ;
1415import { useTranslation } from 'react-i18next' ;
1516import { match } from 'ts-pattern' ;
16- import { Button , Checkbox , cn , Tag , Tooltip } from 'ui-design-system' ;
17+ import { Button , Checkbox , cn , Tag , Tooltip , useFormatLanguage } from 'ui-design-system' ;
1718import { Icon , type IconName } from 'ui-icons' ;
1819import { useGraphAnnotations } from './contexts/GraphAnnotationsContext' ;
1920import { useSelectedObject } from './contexts/GraphFocusContext' ;
@@ -357,6 +358,7 @@ function HypernodeNode({ id, data }: NodeProps<HypernodeRfNode>) {
357358 const { t } = useTranslation ( graphI18n ) ;
358359 const highlighted = useIsNodeHighlighted ( id ) ;
359360 const isHovered = useIsNodeHovered ( id ) ;
361+ const locale = useFormatLanguage ( ) ;
360362
361363 return (
362364 < div
@@ -374,7 +376,7 @@ function HypernodeNode({ id, data }: NodeProps<HypernodeRfNode>) {
374376 </ div >
375377 < Tooltip . Default content = { t ( 'graph:node.too_many' , { count : data . count } ) } >
376378 < div className = "text-xs h-10 min-w-10 rounded-full grid place-items-center border border-grey-border p-xs leading-none" >
377- { data . count }
379+ { formatNumber ( data . count , { language : locale , notation : 'compact' } ) }
378380 </ div >
379381 </ Tooltip . Default >
380382 </ div >
0 commit comments