Browse Source

test commit

serg1557733 1 year ago
parent
commit
9ecaead1cf
2 changed files with 2 additions and 6 deletions
  1. 1 2
      backend/app.js
  2. 1 4
      frontend/src/components/chatPage/userInfo/UserInfo.jsx

+ 1 - 2
backend/app.js

@@ -244,6 +244,7 @@ io.on("connection", async (socket) => {
 
     //need to use this ID to socket privat messges
 
+    
     const usersInSocket = [];
         for (let [id, socket] of io.of("/").sockets) {
             
@@ -267,8 +268,6 @@ io.on("connection", async (socket) => {
 //      const siPrivate = await PrivateMessage.find({toUser: socket.user.id})
 //      console.log(!!siPrivate)
 // }
-console.log(usersInSocket)
-
 
     io.emit('usersOnline', usersInSocket); // send array online users  
 

+ 1 - 4
frontend/src/components/chatPage/userInfo/UserInfo.jsx

@@ -57,14 +57,11 @@ export const UserInfo = () => {
         setDisplayType('none')
     }
 
-   console.log('render userinfo component')
-
-
     // if(socket){
     //     socket.on('my chats', (data)=> console.log('my chats', data))
     // }
 
-
+console.log(user)
         
     return (
             <>