Files
Mav-Mobile-UI/src/context/reducers/SoundContextReducer.ts

20 lines
451 B
TypeScript
Raw Normal View History

import type { SoundPayload, SoundState } from "../../types/types";
export const initalState: SoundState = {
sightingSound: "switch",
NPEDsound: "popup",
hotlists: [],
};
export function reducer(state: SoundState, action: SoundPayload) {
switch (action.type) {
case "UPDATE":
return {
...state,
sightingSound: action.payload.sightingSound,
NPEDsound: action.payload.NPEDsound,
};
}
return state;
}