- refactored code around hotlist hits and sounds

- improved performace for sounds playing
This commit is contained in:
2025-10-09 14:11:58 +01:00
parent 87be346c3b
commit 063815cac0
7 changed files with 57 additions and 85 deletions

View File

@@ -15,9 +15,7 @@ type SightingFeedContextType = {
isError: boolean;
isLoading: boolean;
data: SightingType | undefined;
sessionList: SightingType[];
sessionStarted: boolean;
setSessionStarted: (started: boolean) => void;
};
export const SightingFeedContext = createContext<

View File

@@ -23,9 +23,7 @@ export const SightingFeedProvider = ({
setSelectedSighting,
selectedSighting,
mostRecent,
sessionList,
sessionStarted,
setSessionStarted,
} = useSightingFeed(url);
const [isSightingModalOpen, setSightingModalOpen] = useState(false);
@@ -45,9 +43,7 @@ export const SightingFeedProvider = ({
isLoading,
side,
data,
sessionList,
sessionStarted,
setSessionStarted,
}}
>
{children}

View File

@@ -3,7 +3,7 @@ import type { SoundAction, SoundState } from "../../types/types";
export const initialState: SoundState = {
sightingSound: "switch",
NPEDsound: "popup",
hotlists: [],
hotlists: [{ name: "hotlistName", sound: "notification" }],
soundOptions: [
{ name: "switch (Default)", soundFile: null },
{ name: "popup", soundFile: null },