minor changes and biome fixes

This commit is contained in:
Hunter Thornsberry
2024-07-04 17:29:40 -04:00
parent 0955bbe24b
commit d42e8c10a0
4 changed files with 84 additions and 75 deletions
@@ -7,7 +7,6 @@ export interface TraceRouteProps {
route: Array<number>;
}
export const TraceRoute = ({
from,
to,
@@ -15,20 +14,18 @@ export const TraceRoute = ({
}: TraceRouteProps): JSX.Element => {
const { nodes } = useDevice();
return route.length == 0 ? (
return route.length === 0 ? (
<div className="ml-5 flex">
<span className="ml-4 border-l-2 border-l-backgroundPrimary pl-2 text-textPrimary">
{to?.user?.longName}↔{from?.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">
{to?.user?.longName}↔
{route.map((hop) => (
(nodes.get(hop)?.user?.longName ?? "Unknown") + "↔"
))}
{from?.user?.longName}
{to?.user?.longName}↔
{route.map((hop) => `${nodes.get(hop)?.user?.longName ?? "Unknown"}↔`)}
{from?.user?.longName}
</span>
</div>
);