From 74cf846c48f8994b1af3f8eba44f4fe2ded4b466 Mon Sep 17 00:00:00 2001 From: Roberto Andrade Date: Tue, 29 Aug 2023 01:51:06 +0000 Subject: [PATCH] use context in palette audio --- providers/audio-context.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/audio-context.tsx b/providers/audio-context.tsx index 461bc52..07d675e 100644 --- a/providers/audio-context.tsx +++ b/providers/audio-context.tsx @@ -28,8 +28,8 @@ const AudioContextProvider = ({ children }: { children: ReactNode }) => { const audioData = useRef(null); const [playing, setPlaying] = useState(false); const audioContext = useRef(null); - const { palette } = usePaletteContext(); - const musicType = palettes[palette].audio; + const { currentPalette } = usePaletteContext(); + const musicType = currentPalette.audio; const startPlaying = () => { if (playing || !musicType) return