modem settings management: integrate ModemSettings and ModemToggle components, update hooks for modem configuration, and enhance WiFiSettingsForm submission handling.
This commit is contained in:
@@ -19,19 +19,24 @@ const WiFiSettingsForm = () => {
|
||||
const handleSubmit = (values: WifiSettingValues) => {
|
||||
const wifiConfig = {
|
||||
id: "ModemAndWifiManager-wifi",
|
||||
configHash: "206890572",
|
||||
propSSID: {
|
||||
value: values.ssid,
|
||||
datatype: "java.lang.String",
|
||||
},
|
||||
propPassword: {
|
||||
value: values.password,
|
||||
datatype: "java.lang.String",
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
property: "propSSID",
|
||||
value: values.ssid,
|
||||
},
|
||||
{
|
||||
property: "propPassword",
|
||||
value: values.password,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
wifiMutation.mutate(wifiConfig);
|
||||
//todo: check what response is
|
||||
if (wifiMutation.error) {
|
||||
toast.error("Failed to update WiFi settings");
|
||||
return;
|
||||
}
|
||||
toast.success("WiFi settings updated");
|
||||
};
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user