diff --git a/src/App.js b/src/App.js index 07d339d..37d6461 100644 --- a/src/App.js +++ b/src/App.js @@ -32,20 +32,12 @@ const App = () => { }, play = () => { if (audioElmRef.current) { - audioElmRef.current.play().then(() => { - setPlayPause(true) - }).catch(err => { - console.error('Error playing audio: ' + err.message) - }) + audioElmRef.current.play() } }, pause = () => { if (audioElmRef.current) { - audioElmRef.current.pause().then(() => { - setPlayPause(false) - }).catch(err => { - console.error('Error pausing audio: ' + err.message) - }) + audioElmRef.current.pause() } }, loadData = () => {