Progress on dms, code cleanup

Progress on dms, code cleanup
This commit is contained in:
mgabdev
2020-12-02 23:22:51 -05:00
parent 20d4fc09af
commit 9a43c51085
103 changed files with 3656 additions and 859 deletions

View File

@@ -2,11 +2,15 @@ import React from 'react'
import { FormattedNumber } from 'react-intl'
export const shortNumberFormat = (number) => {
if (isNaN(number)) {
return <FormattedNumber value={0} />
}
if (number < 1000) {
try {
return (<FormattedNumber value={number} />).props.value
} catch (error) {
return <FormattedNumber value={number} />
return <FormattedNumber value={0} />
}
}