Add reset nodeDB command to palette

This commit is contained in:
Sacha Weatherstone
2022-10-08 18:47:29 +10:30
parent 0e585d9258
commit ef6318e291
2 changed files with 71 additions and 65 deletions
+11
View File
@@ -14,6 +14,8 @@
import type React from "react";
import { Fragment, useState } from "react";
import { toast } from "react-hot-toast";
import { useDevice } from "@app/core/providers/useDevice.js";
import { useAppStore } from "@app/core/stores/appStore.js";
import { Combobox, Dialog, Transition } from "@headlessui/react";
@@ -151,6 +153,15 @@ export const CommandPalette = (): JSX.Element => {
{
name: "Reset Peers",
icon: TrashIcon,
action() {
if (connection) {
void toast.promise(connection.resetPeers(), {
loading: "Resetting...",
success: "Succesfully reset peers",
error: "No response received",
});
}
},
},
{
name: "Disconnect",