Skip to content

Commit

Permalink
fix(pomodoro): sound volume increasing while pomodoro is stopped afte…
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Jan 2, 2024
1 parent f89a0e6 commit 6417887
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/sound/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from 'react'
import { useDeepCompareEffect } from 'react-use'

import type { Sound } from '~/data/sounds'

Expand Down Expand Up @@ -88,7 +89,8 @@ export const SoundButton: React.FC<SoundButtonProps> = ({ sound }) => {
soundRef.current.load()
}, [])

useEffect(() => {
// https://github.com/mateusfg7/Noisekun/issues/608#issuecomment-1874096664
useDeepCompareEffect(() => {
const soundState = getSoundState(sound.id)

if (!soundState || !localSoundState) return
Expand Down

0 comments on commit 6417887

Please sign in to comment.