fix: remove battery widget if there is no battery

This commit is contained in:
2025-06-27 15:50:53 -07:00
parent 9c15c93217
commit 13998ab282

View File

@@ -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>