20 lines
451 B
TypeScript
20 lines
451 B
TypeScript
|
|
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;
|
||
|
|
}
|