Check network connection and background colorchange

This commit is contained in:
Eudes Inácio
2021-08-22 01:24:45 +01:00
parent 3f917ae7d4
commit c99f776310
5 changed files with 15 additions and 3 deletions
@@ -55,6 +55,7 @@ export class SynchroService {
}
private onopen = () =>{
document.body.style.setProperty(`--color`, "#0782C9");
console.log('open ======================= welcome to socket server')
}
@@ -85,6 +86,7 @@ export class SynchroService {
// event.code is usually 1006 in this case
console.log('[close] Connection died');
console.log('Reconnect')
document.body.style.setProperty(`--color`, "#eeeb30");
this.connect()
}
}, 100);