- uploaded files seems to work on desktop version
This commit is contained in:
@@ -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
|
||||
</button>
|
||||
<button onClick={handleSyce} type="button">
|
||||
click
|
||||
</button>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
|
||||
Reference in New Issue
Block a user