Browse Source

Fix

pull/307/head
Tilen Komel 1 year ago
parent
commit
9eeed9630b
  1. 1
      src/components/Dialog/NodeOptionsDialog.tsx
  2. 1
      src/components/Dialog/TracerouteResponseDialog.tsx
  3. 9
      src/components/PageComponents/Messages/TraceRoute.tsx

1
src/components/Dialog/NodeOptionsDialog.tsx

@ -8,6 +8,7 @@ import {
} from "@components/UI/Dialog"; } from "@components/UI/Dialog";
import type { Protobuf } from "@meshtastic/js"; import type { Protobuf } from "@meshtastic/js";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import type { JSX } from "react";
import { Button } from "../UI/Button"; import { Button } from "../UI/Button";
export interface NodeOptionsDialogProps { export interface NodeOptionsDialogProps {

1
src/components/Dialog/TracerouteResponseDialog.tsx

@ -8,6 +8,7 @@ import {
} from "@components/UI/Dialog"; } from "@components/UI/Dialog";
import type { Protobuf, Types } from "@meshtastic/js"; import type { Protobuf, Types } from "@meshtastic/js";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import type { JSX } from "react";
import { TraceRoute } from "../PageComponents/Messages/TraceRoute"; import { TraceRoute } from "../PageComponents/Messages/TraceRoute";
export interface TracerouteResponseDialogProps { export interface TracerouteResponseDialogProps {

9
src/components/PageComponents/Messages/TraceRoute.tsx

@ -1,6 +1,7 @@
import { useDevice } from "@app/core/stores/deviceStore.ts"; import { useDevice } from "@app/core/stores/deviceStore.ts";
import type { Protobuf } from "@meshtastic/js"; import type { Protobuf } from "@meshtastic/js";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import type { JSX } from "react";
export interface TraceRouteProps { export interface TraceRouteProps {
from?: Protobuf.Mesh.NodeInfo; from?: Protobuf.Mesh.NodeInfo;
@ -21,13 +22,7 @@ export const TraceRoute = ({
}: TraceRouteProps): JSX.Element => { }: TraceRouteProps): JSX.Element => {
const { nodes } = useDevice(); const { nodes } = useDevice();
return route.length === 0 ? ( return (
<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}
</span>
</div>
) : (
<div className="ml-5 flex"> <div className="ml-5 flex">
<span className="ml-4 border-l-2 border-l-backgroundPrimary pl-2 text-textPrimary"> <span className="ml-4 border-l-2 border-l-backgroundPrimary pl-2 text-textPrimary">
<p className="font-semibold">Route to destination:</p> <p className="font-semibold">Route to destination:</p>

Loading…
Cancel
Save