From a20da226a4dbf7a341cced0e71f2df339799ec80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Mon, 2 May 2022 21:57:15 +0200 Subject: [PATCH] Add zero padding to the widthClass generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #323 Signed-off-by: Lukas Kämmerling --- assets/src/js/components/Table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/src/js/components/Table.js b/assets/src/js/components/Table.js index 4cb9c061..fefa2453 100644 --- a/assets/src/js/components/Table.js +++ b/assets/src/js/components/Table.js @@ -84,7 +84,7 @@ class Table extends Component { let href = (p.Hostname + p.Pathname) || p.URL; let widthClass = ""; if(state.total > 0) { - widthClass = "w" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5)); + widthClass = "w" + ("" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5))).padStart(2, '0'); } let label = p.Pathname