From a9d918fb0f9c72d66534c991c8f165f4655539fe Mon Sep 17 00:00:00 2001 From: Adrien Date: Sat, 18 Feb 2023 15:38:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Time=20to=20wait=20shall=20be=20?= =?UTF-8?q?displayed=20in=202=20digits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/passagesPanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/passagesPanel.tsx b/frontend/src/passagesPanel.tsx index 04973ed..8369aa5 100644 --- a/frontend/src/passagesPanel.tsx +++ b/frontend/src/passagesPanel.tsx @@ -74,7 +74,7 @@ const TtwPassage: VoidComponent<{ const refTs = passage !== undefined ? (passage.expectedDepartTs !== null ? passage.expectedDepartTs : passage.expectedArrivalTs) : 0; const ttwSec = refTs - (getTime(dateNow()) / 1000); - const ttwRepr = ttwSec < 3600 ? `${Math.floor(ttwSec / 60)} min` : format(refTs * 1000, "HH:mm"); + const ttwRepr = ttwSec < 3600 ? `${Math.floor(ttwSec / 60).toString().padStart(2, "0")} min` : format(refTs * 1000, "HH:mm"); const isApproaching = ttwSec <= 60; const text =