From 546f6271773ddf0fab354a32c89de42c5efe3e6f Mon Sep 17 00:00:00 2001 From: Leo Giovanetti Date: Thu, 24 Feb 2022 16:36:02 -0300 Subject: [PATCH] Fix missing zero-padding on troubleshoot (#1974) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/pages/availability/troubleshoot.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/pages/availability/troubleshoot.tsx b/apps/web/pages/availability/troubleshoot.tsx index 85c30885..eeb76a1b 100644 --- a/apps/web/pages/availability/troubleshoot.tsx +++ b/apps/web/pages/availability/troubleshoot.tsx @@ -22,9 +22,9 @@ const AvailabilityView = ({ user }: { user: User }) => { function convertMinsToHrsMins(mins: number) { let h = Math.floor(mins / 60); let m = mins % 60; - h = h < 10 ? 0 + h : h; - m = m < 10 ? 0 + m : m; - return `${h}:${m}`; + let hs = h < 10 ? "0" + h : h; + let ms = m < 10 ? "0" + m : m; + return `${hs}:${ms}`; } useEffect(() => {