This commit is contained in:
Melvin Carvalho
2024-04-29 18:55:32 +02:00
parent e6a8031e86
commit f83ef2dba4

View File

@@ -18,12 +18,12 @@
socket.send(subscribe)
}
socket.onmessage = function (event) {
console.log('refreshing in', t)
const json = JSON.parse(event?.data)
if (json[0] === 'EOSE') {
console.log('EOSE')
return
}
console.log('refreshing in', t)
setTimeout(() => {
document.location.reload()
}, t * 1000)