mirror of
https://github.com/meshtastic/web.git
synced 2026-04-21 14:30:00 -04:00
Add toasts
This commit is contained in:
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Select } from "@app/components/form/Select.js";
|
||||
@@ -49,6 +50,7 @@ export const CannedMessage = (): JSX.Element => {
|
||||
async () => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved Canned Message Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -39,6 +40,7 @@ export const ExternalNotification = (): JSX.Element => {
|
||||
async (): Promise<void> => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved External Notification Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -46,6 +47,7 @@ export const MQTT = (): JSX.Element => {
|
||||
async () => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved MQTT Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -40,6 +41,7 @@ export const RangeTest = (): JSX.Element => {
|
||||
async (): Promise<void> => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved Range Test Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -40,6 +41,7 @@ export const Serial = (): JSX.Element => {
|
||||
async (): Promise<void> => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved Serial Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -40,6 +41,7 @@ export const StoreForward = (): JSX.Element => {
|
||||
async (): Promise<void> => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved Stora & Forward Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
@@ -40,6 +41,7 @@ export const Telemetry = (): JSX.Element => {
|
||||
async () => {
|
||||
reset({ ...data });
|
||||
setLoading(false);
|
||||
toast.success("Saved Telemetry Config, Restarting Node");
|
||||
await Promise.resolve();
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user