Skip to content

Commit

Permalink
use context in palette audio
Browse files Browse the repository at this point in the history
  • Loading branch information
GirasolXimena committed Aug 29, 2023
1 parent c3eefea commit 74cf846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/audio-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const AudioContextProvider = ({ children }: { children: ReactNode }) => {
const audioData = useRef<AnalyserNode | null>(null);
const [playing, setPlaying] = useState(false);
const audioContext = useRef<AudioContext | null>(null);
const { palette } = usePaletteContext();
const musicType = palettes[palette].audio;
const { currentPalette } = usePaletteContext();
const musicType = currentPalette.audio;

const startPlaying = () => {
if (playing || !musicType) return
Expand Down

0 comments on commit 74cf846

Please sign in to comment.