- refactored code around hotlist hits and sounds
- improved performace for sounds playing
This commit is contained in:
@@ -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<
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user