Fixes by hand

This commit is contained in:
Tilen Komel
2025-01-24 01:27:33 +01:00
parent 891a1a9503
commit ec6906a5c3
3 changed files with 4 additions and 4 deletions
@@ -10,7 +10,7 @@ export const Bluetooth = (): JSX.Element => {
useState<string>();
const bluetoothPinChangeEvent = (e: React.ChangeEvent<HTMLInputElement>) => {
if (e.target.value[0] == "0") {
if (e.target.value[0] === "0") {
setBluetoothValidationText("Bluetooth Pin cannot start with 0.");
} else {
setBluetoothValidationText("");
@@ -84,7 +84,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => {
<Subtle aria-label="Battery">
{node.deviceMetrics?.batteryLevel > 100
? "Charging"
: node.deviceMetrics?.batteryLevel + "%"}
: `${node.deviceMetrics?.batteryLevel}%`}
</Subtle>
</div>
)}
@@ -121,7 +121,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => {
<div className="flex mt-2 text-sm">
<div className="flex items-center flex-grow">
<div className="border-2 border-black rounded px-0.5 mr-1">
{isNaN(node.hopsAway) ? "?" : node.hopsAway}
{Number.isNaN(node.hopsAway) ? "?" : node.hopsAway}
</div>
<div>{node.hopsAway === 1 ? "Hop" : "Hops"}</div>
</div>
+1 -1
View File
@@ -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"}
</Subtle>
</div>