diff --git a/src/components/SettingForms/Sound/SoundSettingsFields.tsx b/src/components/SettingForms/Sound/SoundSettingsFields.tsx index 539c155..c2f1fb1 100644 --- a/src/components/SettingForms/Sound/SoundSettingsFields.tsx +++ b/src/components/SettingForms/Sound/SoundSettingsFields.tsx @@ -5,14 +5,10 @@ import { useSoundContext } from "../../../context/SoundContext"; import { useCameraBlackboard } from "../../../hooks/useCameraBlackboard"; import { toast } from "sonner"; import SliderComponent from "../../UI/Slider"; -import { useFileUpload } from "../../../hooks/useFileUpload"; const SoundSettingsFields = () => { const { state, dispatch } = useSoundContext(); const { mutation } = useCameraBlackboard(); - const { query: fileQuery } = useFileUpload({ - queryKey: state.sightingSound ? [state.sightingSound] : undefined, - }); const hotlists: Hotlist[] = state.hotlists; @@ -27,9 +23,7 @@ const SoundSettingsFields = () => { hotlistSound: state.hotlistSound ?? "notification", hotlists, }; - const handleSyce = () => { - fileQuery?.refetch(); - }; + const handleSubmit = async (values: FormValues) => { const updatedValues = { ...values, @@ -149,9 +143,6 @@ const SoundSettingsFields = () => { > Save Settings - )} diff --git a/src/components/SettingForms/Sound/SoundUpload.tsx b/src/components/SettingForms/Sound/SoundUpload.tsx index 339b416..52fc346 100644 --- a/src/components/SettingForms/Sound/SoundUpload.tsx +++ b/src/components/SettingForms/Sound/SoundUpload.tsx @@ -41,8 +41,7 @@ const SoundUpload = () => { path: "soundSettings", value: updatedValues, }); - const responsee = await fileMutation.mutateAsync(values.soundFile); - console.log(responsee); + await fileMutation.mutateAsync(values.soundFile); if (result.reason !== "OK") { toast.error("Cannot update sound settings"); } @@ -52,7 +51,7 @@ const SoundUpload = () => { return ( - {({ setFieldValue, errors, setFieldError, values }) => ( + {({ setFieldValue, errors, setFieldError }) => (