diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx index 47eeeca4..a9a92a69 100644 --- a/src/components/PageComponents/Config/Bluetooth.tsx +++ b/src/components/PageComponents/Config/Bluetooth.tsx @@ -10,7 +10,7 @@ export const Bluetooth = (): JSX.Element => { useState(); const bluetoothPinChangeEvent = (e: React.ChangeEvent) => { - if (e.target.value[0] == "0") { + if (e.target.value[0] === "0") { setBluetoothValidationText("Bluetooth Pin cannot start with 0."); } else { setBluetoothValidationText(""); diff --git a/src/components/PageComponents/Map/NodeDetail.tsx b/src/components/PageComponents/Map/NodeDetail.tsx index 00847150..f464ecef 100644 --- a/src/components/PageComponents/Map/NodeDetail.tsx +++ b/src/components/PageComponents/Map/NodeDetail.tsx @@ -84,7 +84,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => { {node.deviceMetrics?.batteryLevel > 100 ? "Charging" - : node.deviceMetrics?.batteryLevel + "%"} + : `${node.deviceMetrics?.batteryLevel}%`} )} @@ -121,7 +121,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => {
- {isNaN(node.hopsAway) ? "?" : node.hopsAway} + {Number.isNaN(node.hopsAway) ? "?" : node.hopsAway}
{node.hopsAway === 1 ? "Hop" : "Hops"}
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index d4ada2bd..2c4f1963 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -91,7 +91,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => { {myNode?.deviceMetrics?.batteryLevel ? myNode?.deviceMetrics?.batteryLevel > 100 ? "Charging" - : myNode?.deviceMetrics?.batteryLevel + "%" + : `${myNode?.deviceMetrics?.batteryLevel}%` : "UNK"}