doc: add prettyPrintStat method

This commit is contained in:
Leon Xu committed 2022-05-03 21:00:51 -07:00
1 parent 6e5d99c925
commit 06f258a00b
1 file changed
+3
+3
View File
@@ -22,6 +22,9 @@ export const sortData = (data) => {
return sortedData.sort((a, b) => (a.cases > b.cases ? -1 : 1));
};
export const prettyPrintStat = (stat) =>
stat ? `+${numeral(stat).format("0.0a")}` : "+0";
export const showDataOnMap = (data, casesType = "cases") =>
data.map((country) => (
<Circle