fix audio not working during development due to react's useEffect wil be triggered twice (#6126)

pull/6581/head
Lance Mao 2 years ago committed by GitHub
parent 6a9d202414
commit 75445a0c66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -152,6 +152,10 @@ const VoiceInput = ({
useEffect(() => {
initCanvas()
handleStartRecord()
const recorderRef = recorder?.current
return () => {
recorderRef?.stop()
}
}, [])
const minutes = parseInt(`${parseInt(`${originDuration}`) / 60}`)

Loading…
Cancel
Save