- added volume setting for sighting hits
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user