Skip to content

Commit a60db55

Browse files
authored
Merge pull request meshtastic#478 from Hunter275/fix-nodes-page
Fix Nodes page
2 parents 6e3d326 + e1d4490 commit a60db55

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/pages/Nodes.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { LocationResponseDialog } from "@app/components/Dialog/LocationResponseDialog";
2-
import { NodeOptionsDialog } from "@app/components/Dialog/NodeOptionsDialog";
3-
import { TracerouteResponseDialog } from "@app/components/Dialog/TracerouteResponseDialog";
4-
import Footer from "@app/components/UI/Footer";
1+
import { LocationResponseDialog } from "@app/components/Dialog/LocationResponseDialog.tsx";
2+
import { NodeOptionsDialog } from "@app/components/Dialog/NodeOptionsDialog.tsx";
3+
import { TracerouteResponseDialog } from "@app/components/Dialog/TracerouteResponseDialog.tsx";
4+
import Footer from "@app/components/UI/Footer.tsx";
55
import { Sidebar } from "@components/Sidebar.tsx";
66
import { Avatar } from "@components/UI/Avatar.tsx";
77
import { Mono } from "@components/generic/Mono.tsx";
@@ -135,21 +135,21 @@ const NodesPage = (): JSX.Element => {
135135
.match(/.{1,2}/g)
136136
?.join(":") ?? "UNK"}
137137
</Mono>,
138-
<Fragment key="lastHeard">
138+
<Mono className="px-4" key="lastHeard">
139139
{node.lastHeard === 0 ? (
140-
<p>Never</p>
140+
<p className="px-4">Never</p>
141141
) : (
142142
<TimeAgo timestamp={node.lastHeard * 1000} />
143143
)}
144-
</Fragment>,
144+
</Mono>,
145145
<Mono key="snr">
146146
{node.snr}db/
147147
{Math.min(Math.max((node.snr + 10) * 5, 0), 100)}%/
148148
{(node.snr + 10) * 5}raw
149149
</Mono>,
150150
<Mono key="pki">
151151
{node.user?.publicKey && node.user?.publicKey.length > 0 ? (
152-
<LockIcon className="text-green-600" />
152+
<LockIcon className="text-green-600 mx-auto" />
153153
) : (
154154
<LockOpenIcon className="text-yellow-300 mx-auto" />
155155
)}
@@ -158,7 +158,7 @@ const NodesPage = (): JSX.Element => {
158158
{node.lastHeard !== 0
159159
? node.viaMqtt === false && node.hopsAway === 0
160160
? "Direct"
161-
: `${node.hopsAway.toString()} ${
161+
: `${node.hopsAway?.toString()} ${
162162
node.hopsAway > 1 ? "hops" : "hop"
163163
} away`
164164
: "-"}

0 commit comments

Comments
 (0)