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 1
1
import React from "react" ;
2
2
3
3
import { Tooltip } from "@kleros/ui-components-library" ;
4
+
5
+ import { commify } from "utils/commify" ;
6
+
4
7
interface INumberDisplay {
5
8
value : string | number ;
6
9
unit ?: string ;
@@ -31,10 +34,11 @@ const NumberDisplay: React.FC<INumberDisplay> = ({
31
34
isCurrency = false ,
32
35
} ) => {
33
36
const parsedValue = Number ( value ) ;
34
- const formattedValue = getFormattedValue ( parsedValue , decimals ) ;
37
+ const formattedValue = commify ( getFormattedValue ( parsedValue , decimals ) ) ;
35
38
const tooltipValue = isCurrency ? `${ unit } ${ value } ` : `${ value } ${ unit } ` ;
36
39
const displayUnit = showUnitInDisplay ? unit : "" ;
37
40
const displayValue = isCurrency ? `${ displayUnit } ${ formattedValue } ` : `${ formattedValue } ${ displayUnit } ` ;
41
+
38
42
return (
39
43
< Tooltip small text = { tooltipValue } place = { place } >
40
44
{ displayValue }
You can’t perform that action at this time.
0 commit comments