add connectionStatus state and component
This commit is contained in:
parent
81b4d018fb
commit
e13f90a6cc
6 changed files with 39 additions and 4 deletions
|
|
@ -60,9 +60,9 @@ const onMessageCallback = (payload: string) => {
|
|||
|
||||
}
|
||||
|
||||
const onConnectionStatusCallback = (alive: boolean) => {
|
||||
console.log('[Session]: Connection Alive: ', alive);
|
||||
// ipcEmit('connection-state', alive);
|
||||
const onConnectionStatusCallback = (isAlive: boolean | Error) => {
|
||||
console.log('[Session]: Connection Alive: ', isAlive);
|
||||
ipcEmit('set-connection-status', isAlive);
|
||||
}
|
||||
|
||||
const { connect, send, close } = useWebsockets(
|
||||
|
|
|
|||
Loading…
Reference in a new issue