- added volume setting for sighting hits

This commit is contained in:
2025-10-17 16:12:02 +01:00
parent 3eb539fd9d
commit 82b84dc46e
14 changed files with 145 additions and 59 deletions

View File

@@ -7,13 +7,10 @@ type SoundContextType = {
audioArmed: boolean;
};
export const SoundContext = createContext<SoundContextType | undefined>(
undefined
);
export const SoundContext = createContext<SoundContextType | undefined>(undefined);
export const useSoundContext = () => {
const ctx = useContext(SoundContext);
if (!ctx)
throw new Error("useSoundContext must be used within <SoundContext>");
if (!ctx) throw new Error("useSoundContext must be used within <SoundContext>");
return ctx;
};