Fix peer unknown name

This commit is contained in:
Sacha Weatherstone
2022-11-06 20:42:55 +10:00
parent 367912e27e
commit b41b69b410
+5 -3
View File
@@ -9,7 +9,7 @@ import { useDevice } from "@core/providers/useDevice.js";
import { Hashicon } from "@emeraldpay/hashicon-react"; import { Hashicon } from "@emeraldpay/hashicon-react";
import { import {
ArrowPathRoundedSquareIcon, ArrowPathRoundedSquareIcon,
EllipsisHorizontalIcon, EllipsisHorizontalIcon
} from "@heroicons/react/24/outline"; } from "@heroicons/react/24/outline";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/meshtasticjs";
@@ -71,7 +71,9 @@ export const PeersPage = (): JSX.Element => {
> >
<td className="flex gap-2 whitespace-nowrap py-2 pr-3 pl-6 text-sm font-medium text-gray-900"> <td className="flex gap-2 whitespace-nowrap py-2 pr-3 pl-6 text-sm font-medium text-gray-900">
<Hashicon size={24} value={node.data.num.toString()} /> <Hashicon size={24} value={node.data.num.toString()} />
<span className="my-auto">{node.data.user?.longName}</span> <span className="my-auto">
{node.data.user?.longName ?? "Unknown"}
</span>
</td> </td>
<td className="whitespace-nowrap py-2 text-sm text-gray-500"> <td className="whitespace-nowrap py-2 text-sm text-gray-500">
<span className="rounded-md bg-slate-200 p-1"> <span className="rounded-md bg-slate-200 p-1">
@@ -106,7 +108,7 @@ export const PeersPage = (): JSX.Element => {
{ {
loading: "Requesting Metadata...", loading: "Requesting Metadata...",
success: "Recieved Metadata", success: "Recieved Metadata",
error: "No response received", error: "No response received"
} }
); );
} }