Skip to content

Commit

Permalink
Merge pull request #337 from Hunter275/issue-335-charging
Browse files Browse the repository at this point in the history
If the batteryLevel is over 100, its charging
  • Loading branch information
fifieldt authored Nov 10, 2024
2 parents 443c7fc + 94cca88 commit de597d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
<div className="px-8 pb-6">
<div className="flex items-center">
<BatteryMediumIcon size={24} viewBox={"0 0 28 24"} />
<Subtle>{myNode?.deviceMetrics?.batteryLevel ?? "UNK"}%</Subtle>
<Subtle>{myNode?.deviceMetrics?.batteryLevel ? myNode?.deviceMetrics?.batteryLevel > 100 ? "Charging" : myNode?.deviceMetrics?.batteryLevel + "%" : "UNK"}</Subtle>
</div>
<div className="flex items-center">
<ZapIcon size={24} viewBox={"0 0 36 24"} />
Expand Down

0 comments on commit de597d2

Please sign in to comment.