Fix missing zero-padding on troubleshoot (#1974)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Leo Giovanetti 2022-02-24 16:36:02 -03:00 committed by GitHub
parent c6169607ae
commit 546f627177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(() => {