Skip to content

Commit 2f20233

Browse files
[#630] Implement thousand formatter to map summary table
1 parent f3cf26a commit 2f20233

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

frontend/src/pages/welcome/Welcome.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Chart from "../../components/chart";
1515
import { MapViewHelpText, ViewSummaryModal } from "../../components/utils";
1616
import { routePath } from "../../components/route";
1717
import { IDCSubMenu } from "../cases/components";
18+
import { thousandFormatter } from "../../components/chart/options/common";
1819

1920
const perPage = 10;
2021
const defData = {
@@ -320,8 +321,16 @@ const Welcome = () => {
320321
{ totalCases: 0, totalFarmers: 0 }
321322
);
322323
return [
323-
{ key: "1", label: "Total Cases", value: totals.totalCases },
324-
{ key: "2", label: "Total Farmers", value: totals.totalFarmers },
324+
{
325+
key: "1",
326+
label: "Total Cases",
327+
value: thousandFormatter(totals.totalCases, 0),
328+
},
329+
{
330+
key: "2",
331+
label: "Total Farmers",
332+
value: thousandFormatter(totals.totalFarmers, 0),
333+
},
325334
];
326335
}, [mapData]);
327336

0 commit comments

Comments
 (0)