File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22
33import { Tooltip } from "@kleros/ui-components-library" ;
4+
5+ import { commify } from "utils/commify" ;
6+
47interface INumberDisplay {
58 value : string | number ;
69 unit ?: string ;
@@ -31,10 +34,11 @@ const NumberDisplay: React.FC<INumberDisplay> = ({
3134 isCurrency = false ,
3235} ) => {
3336 const parsedValue = Number ( value ) ;
34- const formattedValue = getFormattedValue ( parsedValue , decimals ) ;
37+ const formattedValue = commify ( getFormattedValue ( parsedValue , decimals ) ) ;
3538 const tooltipValue = isCurrency ? `${ unit } ${ value } ` : `${ value } ${ unit } ` ;
3639 const displayUnit = showUnitInDisplay ? unit : "" ;
3740 const displayValue = isCurrency ? `${ displayUnit } ${ formattedValue } ` : `${ formattedValue } ${ displayUnit } ` ;
41+
3842 return (
3943 < Tooltip small text = { tooltipValue } place = { place } >
4044 { displayValue }
You can’t perform that action at this time.
0 commit comments