catch
Signed-off-by: ale <ale@manalejandro.com>
This commit is contained in:
parent
bf0ddd53b1
commit
c233fcc017
@ -33,12 +33,12 @@ const App = () => {
|
||||
if (audioElmRef.current) {
|
||||
await audioElmRef.current.play()
|
||||
}
|
||||
}),
|
||||
}, [audioElmRef]),
|
||||
pause = useCallback(async () => {
|
||||
if (audioElmRef.current) {
|
||||
await audioElmRef.current.pause()
|
||||
}
|
||||
}),
|
||||
}, [audioElmRef]),
|
||||
loadData = () => {
|
||||
fetch('/stream.json').then(response => response.json()).then(json => {
|
||||
setJson(json)
|
||||
@ -58,6 +58,8 @@ const App = () => {
|
||||
setMaxListeners(listeners[i].textContent)
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('Error fetching data: ' + err.message)
|
||||
})
|
||||
}
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user