From c42fc5664457f4d96b24adf702816b2abb8fe1ba Mon Sep 17 00:00:00 2001 From: primakov Date: Sun, 16 Apr 2023 13:03:00 +0300 Subject: [PATCH] fix --- src/pages/UserPage.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pages/UserPage.tsx b/src/pages/UserPage.tsx index 6d6dec0..772ed09 100644 --- a/src/pages/UserPage.tsx +++ b/src/pages/UserPage.tsx @@ -42,11 +42,9 @@ export const UserPage = () => { const socket = getSocket(); localStorage.setItem('name', value) - socket.emit('add', { socketId, name: value, lessonid: lessonId }); + socket.emit('add', { socketId: localStorage.getItem('socketId') || socketId, name: value, lessonid: lessonId }); }, [value]) - console.log(getSocket()) - return ( @@ -69,11 +67,6 @@ export const UserPage = () => { - -
-          {JSON.stringify(getSocket()?.connected, null, 4)}
-          {JSON.stringify(getSocket()?.id, null, 4)}
-        
)