Browse Source

feat: removed traceroute from message screen.

pull/390/head
Dan Ditomaso 1 year ago
parent
commit
794d214636
  1. 20
      src/components/PageComponents/Messages/ChannelChat.tsx
  2. 15
      src/pages/Messages.tsx

20
src/components/PageComponents/Messages/ChannelChat.tsx

@ -5,8 +5,7 @@ import {
} from "@app/core/stores/deviceStore.ts";
import { Message } from "@components/PageComponents/Messages/Message.tsx";
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
import { TraceRoute } from "@components/PageComponents/Messages/TraceRoute.tsx";
import type { Protobuf, Types } from "@meshtastic/js";
import type { Types } from "@meshtastic/js";
import { InboxIcon } from "lucide-react";
import type { JSX } from "react";
@ -14,7 +13,6 @@ export interface ChannelChatProps {
messages?: MessageWithState[];
channel: Types.ChannelNumber;
to: Types.Destination;
traceroutes?: Types.PacketMetadata<Protobuf.Mesh.RouteDiscovery>[];
}
const EmptyState = () => (
@ -28,7 +26,6 @@ export const ChannelChat = ({
messages,
channel,
to,
traceroutes,
}: ChannelChatProps): JSX.Element => {
const { nodes } = useDevice();
@ -64,21 +61,6 @@ export const ChannelChat = ({
<MessageInput to={to} channel={channel} />
</div>
</div>
{/* {to === "broadcast" ? null : traceroutes ? (
traceroutes.map((traceroute, index) => (
<TraceRoute
key={traceroute.id}
from={nodes.get(traceroute.from)}
to={nodes.get(traceroute.to)}
route={traceroute.data.route}
/>
))
) : (
<div className="m-auto">
<InboxIcon className="m-auto" />
<Subtle>No Traceroutes</Subtle>
</div>
)} */}
</>
);
};

15
src/pages/Messages.tsx

@ -108,21 +108,6 @@ const MessagesPage = () => {
});
},
},
{
icon: WaypointsIcon,
async onClick() {
const targetNode = nodes.get(activeChat)?.num;
if (targetNode === undefined) return;
toast({
title: "Sending Traceroute, please wait...",
});
await connection?.traceRoute(targetNode).then(() =>
toast({
title: "Traceroute sent.",
}),
);
},
},
]
: []
}

Loading…
Cancel
Save