Skip to content

Commit d3eafb8

Browse files
committed
only show runtime if nonzero
1 parent 09d44b5 commit d3eafb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gui/src/components/tracker/TrackerBattery.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ export function TrackerBattery({
3939
</div>
4040
{((!charging || showVoltage) && (
4141
<div className="w-15">
42-
{!charging && runtime != null && (
42+
{!charging && runtime != null && runtime > 0 && (
4343
<Typography color={textColor}>
4444
{(runtime / BigInt(3600000000)).toString() +
4545
'h ' +
4646
((runtime % BigInt(3600000000)) / BigInt(60000000)).toString() +
47-
'min' || 'N/A'}
47+
'min'}
4848
</Typography>
4949
)}
5050
{!charging && (!runtime || showVoltage) && (

0 commit comments

Comments
 (0)