From 72c987d1f0db9b19a2cf8b9f90f51f41533910cb Mon Sep 17 00:00:00 2001 From: Bram Suurd Date: Mon, 8 Sep 2025 12:15:52 +0200 Subject: [PATCH] Format numerical values in DataFetcher component for better readability --- frontend/src/app/data/page.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/data/page.tsx b/frontend/src/app/data/page.tsx index 10657627c..b0694e3cd 100644 --- a/frontend/src/app/data/page.tsx +++ b/frontend/src/app/data/page.tsx @@ -38,6 +38,7 @@ const DataFetcher: React.FC = () => { const [currentPage, setCurrentPage] = useState(1); const [itemsPerPage, setItemsPerPage] = useState(25); const [sortConfig, setSortConfig] = useState<{ key: string; direction: "ascending" | "descending" } | null>(null); + const nf = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }); useEffect(() => { const fetchSummary = async () => { @@ -129,19 +130,24 @@ const DataFetcher: React.FC = () => {

- {summary?.total_entries} + {nf.format( + summary?.total_entries ?? 0, + )} {" "} results found

Status Legend: 🔄 installing - {summary?.status_count.installing ?? 0} + {" "} + {nf.format(summary?.status_count.installing ?? 0)} {" "} | ✔️ completed - {summary?.status_count.done ?? 0} + {" "} + {nf.format(summary?.status_count.done ?? 0)} {" "} | ❌ failed - {summary?.status_count.failed ?? 0} + {" "} + {nf.format(summary?.status_count.failed ?? 0)} {" "} | ❓ unknown