- added volume functionality for NPED notifications
This commit is contained in:
@@ -24,11 +24,17 @@ const SoundSettingsFields = () => {
|
||||
};
|
||||
|
||||
const handleSubmit = async (values: FormValues) => {
|
||||
dispatch({ type: "UPDATE", payload: values });
|
||||
const updatedValues = {
|
||||
...values,
|
||||
sightingVolume: state.sightingVolume,
|
||||
NPEDsoundVolume: state.NPEDsoundVolume,
|
||||
};
|
||||
|
||||
dispatch({ type: "UPDATE", payload: updatedValues });
|
||||
const result = await mutation.mutateAsync({
|
||||
operation: "INSERT",
|
||||
path: "soundSettings",
|
||||
value: values,
|
||||
value: updatedValues,
|
||||
});
|
||||
if (result.reason !== "OK") {
|
||||
toast.error("Cannot update sound settings");
|
||||
|
||||
Reference in New Issue
Block a user