Implement sound settings update and integrate sound context in sightings widget
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
import switchSound from "../assets/sounds/ui/switch.mp3";
|
||||
import popup from "../assets/sounds/ui/popup_open.mp3";
|
||||
import notification from "../assets/sounds/ui/notification.mp3";
|
||||
|
||||
export function getSoundFileName(name: string) {
|
||||
const sounds: Record<string, string> = {
|
||||
switch: switchSound,
|
||||
popup: popup,
|
||||
notification: notification,
|
||||
};
|
||||
return sounds[name] ?? null;
|
||||
}
|
||||
|
||||
const randomChars = () => {
|
||||
const uppercaseAsciiStart = 65;
|
||||
const letterIndex = Math.floor(Math.random() * 26);
|
||||
|
||||
Reference in New Issue
Block a user