From bf68e8a58ebba6dd8d6c6e2ca6d4064fea04d246 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Mon, 3 Jun 2024 23:41:21 -0400 Subject: [PATCH] - add battery and voltage to sidebar --- src/components/Sidebar.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 8b81fe92..7712cf94 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -11,6 +11,8 @@ import { MessageSquareIcon, SettingsIcon, UsersIcon, + ZapIcon, + BatteryMediumIcon } from "lucide-react"; export interface SidebarProps { @@ -58,7 +60,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { return (
-
+
{myNode?.user?.shortName ?? "UNK"} @@ -73,6 +75,16 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
+
+
+ + {myNode?.deviceMetrics?.batteryLevel ?? "UNK"}% +
+
+ + {myNode?.deviceMetrics?.voltage.toPrecision(3) ?? "UNK"} volts +
+
{pages.map((link) => (