Refactor sound context and update sound settings functionality; remove console logs and improve sound file handling
This commit is contained in:
@@ -276,6 +276,7 @@ export type FormValues = {
|
||||
};
|
||||
|
||||
export type SoundUploadValue = {
|
||||
name: string;
|
||||
soundFile: File | null;
|
||||
};
|
||||
|
||||
@@ -283,9 +284,21 @@ export type SoundState = {
|
||||
sightingSound: SoundValue;
|
||||
NPEDsound: SoundValue;
|
||||
hotlists: Hotlist[];
|
||||
soundOptions?: SoundUploadValue[];
|
||||
};
|
||||
|
||||
export type SoundPayload = {
|
||||
type: string;
|
||||
payload: SoundState;
|
||||
type UpdateAction = {
|
||||
type: "UPDATE";
|
||||
payload: {
|
||||
sightingSound: SoundValue;
|
||||
NPEDsound: SoundValue;
|
||||
hotlists: Hotlist[];
|
||||
};
|
||||
};
|
||||
|
||||
type AddAction = {
|
||||
type: "ADD";
|
||||
payload: SoundUploadValue;
|
||||
};
|
||||
|
||||
export type SoundAction = UpdateAction | AddAction;
|
||||
|
||||
Reference in New Issue
Block a user