Updated loading states and error states accross app
This commit is contained in:
@@ -2,7 +2,6 @@ import { Field, Form, Formik } from "formik";
|
||||
import FormGroup from "../components/FormGroup";
|
||||
import type { WifiSettingValues } from "../../../types/types";
|
||||
import { useWifiAndModem } from "../../../hooks/useCameraWifiandModem";
|
||||
import { toast } from "sonner";
|
||||
import { useState } from "react";
|
||||
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
@@ -36,12 +35,6 @@ const WiFiSettingsForm = () => {
|
||||
};
|
||||
|
||||
wifiMutation.mutate(wifiConfig);
|
||||
|
||||
if (wifiMutation.error) {
|
||||
toast.error("Failed to update WiFi settings");
|
||||
return;
|
||||
}
|
||||
toast.success("WiFi settings updated");
|
||||
};
|
||||
return (
|
||||
<Formik
|
||||
|
||||
Reference in New Issue
Block a user