Fix traceroute ordering for multi-hop traceroutes

This commit is contained in:
Tom Fifield
2024-05-27 20:57:09 +08:00
parent e825a737b0
commit 569c2daa09
@@ -18,17 +18,17 @@ export const TraceRoute = ({
return route.length == 0 ? (
<div className="ml-5 flex">
<span className="ml-4 border-l-2 border-l-backgroundPrimary pl-2 text-textPrimary">
{from?.user?.longName}↔{to?.user?.longName}
{to?.user?.longName}↔{from?.user?.longName}
</span>
</div>
) : (
<div className="ml-5 flex">
<span className="ml-4 border-l-2 border-l-backgroundPrimary pl-2 text-textPrimary">
{from?.user?.longName}↔
{to?.user?.longName}↔
{route.map((hop) => (
nodes.get(hop)?.user?.longName ?? "Unknown" + "↔"
nodes.get(hop)?.user?.longName + "↔" ?? "Unknown↔"
))}
{to?.user?.longName}
{from?.user?.longName}
</span>
</div>
);