From ab73741109d5c6e71afb4f99c562e894e3c40e2a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 18 Feb 2023 17:48:21 +0900 Subject: [PATCH] hack for now for JP so it doesn't so such a high percentage --- src/ProgressPane.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ProgressPane.jsx b/src/ProgressPane.jsx index 0350488..3a0497f 100644 --- a/src/ProgressPane.jsx +++ b/src/ProgressPane.jsx @@ -40,8 +40,15 @@ async function fetchData(version) { }) const latest = rows[rows.length - 1] + + let totalBytes = latest.totalBytes + // TODO hack for JP since we haven't mapped all the segments + if (version !== "us") { + totalBytes = 3718668 + } + for (const row of rows) { - row.percentBytes = (row.matchingBytes / latest.totalBytes) * 100 + row.percentBytes = (row.matchingBytes / totalBytes) * 100 } return rows