Auth front-end

This commit is contained in:
Koper
2023-08-18 19:29:02 +07:00
parent 327911c43e
commit 733054428e
15 changed files with 234 additions and 43 deletions

11
www/app/lib/time.ts Normal file
View File

@@ -0,0 +1,11 @@
export const formatTime = (seconds: number): string => {
let hours = Math.floor(seconds / 3600);
let minutes = Math.floor((seconds % 3600) / 60);
let secs = Math.floor(seconds % 60);
let timeString = `${hours > 0 ? hours + ":" : ""}${minutes
.toString()
.padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
return timeString;
};