- added volume functionality for NPED notifications

This commit is contained in:
2025-10-20 09:11:05 +01:00
parent 82b84dc46e
commit b2dd35b311
5 changed files with 26 additions and 64 deletions

View File

@@ -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");