fix: remove battery widget if there is no battery
This commit is contained in:
@@ -109,6 +109,9 @@ function Battery() {
|
|||||||
return { label: `${full_percentage == 100 ? "FULL" : "BAT"}: ${full_percentage}%` }
|
return { label: `${full_percentage == 100 ? "FULL" : "BAT"}: ${full_percentage}%` }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!battery.is_battery) {
|
||||||
|
return <></>
|
||||||
|
}
|
||||||
return <box className="status-box">
|
return <box className="status-box">
|
||||||
<label label={battery_info((i) => i.label)} />
|
<label label={battery_info((i) => i.label)} />
|
||||||
</box>
|
</box>
|
||||||
|
|||||||
Reference in New Issue
Block a user