Saving inputs to browser storage

This commit is contained in:
2025-02-08 10:09:17 +00:00
parent 71d7f5cb07
commit 36c4502595
4 changed files with 91 additions and 10 deletions

View File

@@ -40,10 +40,13 @@ export function minsToTime(totalMinutes) {
let hours = Math.floor(absMinutes / 60);
let minutes = absMinutes % 60;
if (minutes > 0) {
return `${prefix}${hours}h ${minutes}m`;
if (hours > 0) {
return `${prefix}${hours}h ${minutes}m`;
}
return `${prefix}${minutes}m`;
}
if (hours > 0) {
return `${hours}h`;
return `${prefix}${hours}h`;
}
return '0m';
return `${prefix}0m`;
}