Fixes by hand
This commit is contained in:
@@ -10,7 +10,7 @@ export const Bluetooth = (): JSX.Element => {
|
|||||||
useState<string>();
|
useState<string>();
|
||||||
|
|
||||||
const bluetoothPinChangeEvent = (e: React.ChangeEvent<HTMLInputElement>) => {
|
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.");
|
setBluetoothValidationText("Bluetooth Pin cannot start with 0.");
|
||||||
} else {
|
} else {
|
||||||
setBluetoothValidationText("");
|
setBluetoothValidationText("");
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => {
|
|||||||
<Subtle aria-label="Battery">
|
<Subtle aria-label="Battery">
|
||||||
{node.deviceMetrics?.batteryLevel > 100
|
{node.deviceMetrics?.batteryLevel > 100
|
||||||
? "Charging"
|
? "Charging"
|
||||||
: node.deviceMetrics?.batteryLevel + "%"}
|
: `${node.deviceMetrics?.batteryLevel}%`}
|
||||||
</Subtle>
|
</Subtle>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -121,7 +121,7 @@ export const NodeDetail = ({ node }: NodeDetailProps): JSX.Element => {
|
|||||||
<div className="flex mt-2 text-sm">
|
<div className="flex mt-2 text-sm">
|
||||||
<div className="flex items-center flex-grow">
|
<div className="flex items-center flex-grow">
|
||||||
<div className="border-2 border-black rounded px-0.5 mr-1">
|
<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>
|
||||||
<div>{node.hopsAway === 1 ? "Hop" : "Hops"}</div>
|
<div>{node.hopsAway === 1 ? "Hop" : "Hops"}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
|
|||||||
{myNode?.deviceMetrics?.batteryLevel
|
{myNode?.deviceMetrics?.batteryLevel
|
||||||
? myNode?.deviceMetrics?.batteryLevel > 100
|
? myNode?.deviceMetrics?.batteryLevel > 100
|
||||||
? "Charging"
|
? "Charging"
|
||||||
: myNode?.deviceMetrics?.batteryLevel + "%"
|
: `${myNode?.deviceMetrics?.batteryLevel}%`
|
||||||
: "UNK"}
|
: "UNK"}
|
||||||
</Subtle>
|
</Subtle>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user