a lot
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { isNil } from 'ramda';
|
||||
|
||||
export function useNumber() {
|
||||
const locale = 'en-gb';
|
||||
|
||||
return {
|
||||
format: (value: number) => {
|
||||
format: (value: number | null | undefined) => {
|
||||
if (isNil(value)) {
|
||||
return 'N/A';
|
||||
}
|
||||
return new Intl.NumberFormat(locale, {
|
||||
maximumSignificantDigits: 20,
|
||||
}).format(value);
|
||||
|
||||
Reference in New Issue
Block a user