- added state to set sound set settings for sightings and NPED hits
- added function to save mute settings
This commit is contained in:
@@ -15,7 +15,7 @@ const getAllBlackboardData = async () => {
|
||||
};
|
||||
|
||||
const viewBlackboardData = async (options: CameraBlackBoardOptions) => {
|
||||
const response = await fetch(`${CAM_BASE}/api/blackboard`, {
|
||||
const response = await fetch(`/api/blackboard`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(options),
|
||||
@@ -45,7 +45,6 @@ export const useCameraBlackboard = () => {
|
||||
id: "viewBlackboardData",
|
||||
});
|
||||
},
|
||||
onSuccess: () => toast.success("Sighting successfully added to alert list"),
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -39,7 +39,7 @@ export function useSightingFeed(url: string | undefined) {
|
||||
return latestRef;
|
||||
}, [latestRef]);
|
||||
const soundSrc = useMemo(() => {
|
||||
return getSoundFileURL(state.sightingSound) ?? switchSound;
|
||||
return getSoundFileURL(state?.sightingSound) ?? switchSound;
|
||||
}, [state.sightingSound]);
|
||||
|
||||
//use latestref instead of trigger to revert back
|
||||
|
||||
Reference in New Issue
Block a user