battery 0 days fix

rename-package
vinay kumar 2025-08-27 12:33:36 +05:30
parent 45d2f6a481
commit 1488116909
1 changed files with 3 additions and 7 deletions

View File

@ -27,13 +27,7 @@ const BatteryDetails = () => {
let progress = 0;
let durationText = "---";
if (
start &&
end &&
!isNaN(start.getTime()) &&
!isNaN(end.getTime()) &&
now < end
) {
if (start && end && !isNaN(start.getTime()) && !isNaN(end.getTime())) {
const totalDuration = end.getTime() - start.getTime();
const elapsed = now.getTime() - start.getTime();
const remaining = Math.max(end.getTime() - now.getTime(), 0);
@ -64,6 +58,8 @@ const BatteryDetails = () => {
parts.push(`${daysLeft} ${t("home.day")}`);
}
console.log(parts, "parts");
return parts.join(", ");
})();
}