mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 19:57:37 +08:00
fix audio not working during development due to react's useEffect wil be triggered twice (#6126)
This commit is contained in:
parent
6a9d202414
commit
75445a0c66
@ -152,6 +152,10 @@ const VoiceInput = ({
|
||||
useEffect(() => {
|
||||
initCanvas()
|
||||
handleStartRecord()
|
||||
const recorderRef = recorder?.current
|
||||
return () => {
|
||||
recorderRef?.stop()
|
||||
}
|
||||
}, [])
|
||||
|
||||
const minutes = parseInt(`${parseInt(`${originDuration}`) / 60}`)
|
||||
|
Loading…
Reference in New Issue
Block a user