Add toasts

This commit is contained in:
Sacha Weatherstone
2022-10-07 16:11:45 +10:30
parent d23fe966aa
commit 04f5eeaf47
19 changed files with 64 additions and 2 deletions
+5
View File
@@ -1,3 +1,5 @@
import toast from "react-hot-toast";
import type { Device } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/meshtasticjs";
@@ -53,6 +55,9 @@ export const subscribeAll = (
});
connection.onNodeInfoPacket.subscribe((nodeInfo) => {
toast(`New Node Discovered: ${nodeInfo.data.user?.shortName ?? "UNK"}`, {
icon: "🔎",
});
device.addNodeInfo(nodeInfo);
});