From 36a8ea70d71670eb7522650848acc72bdf45eb5b Mon Sep 17 00:00:00 2001 From: SimbaFs Date: Sat, 3 Aug 2024 01:44:44 +0800 Subject: [PATCH] fix ws status --- frontend/src/hooks/useAttendance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/useAttendance.ts b/frontend/src/hooks/useAttendance.ts index a1d3271..5d0e965 100644 --- a/frontend/src/hooks/useAttendance.ts +++ b/frontend/src/hooks/useAttendance.ts @@ -68,8 +68,8 @@ export function useAttendance() { }, [lastMessage]) return { - // isConnected: socket?.readyState === WebSocket.OPEN, - isConnected: !!socket, + isConnected: socket?.readyState === WebSocket.OPEN, + // isConnected: !!socket, attendance, updateAttendance, }