diff --git a/src/components/NotificationsSidebar/index.js b/src/components/NotificationsSidebar/index.js index 31b00e5..07ad67d 100644 --- a/src/components/NotificationsSidebar/index.js +++ b/src/components/NotificationsSidebar/index.js @@ -163,12 +163,11 @@ const NotificationsSidebar = () => { stomp.current.connect( {}, () => { - // connected - console.log('Websocket connected'); + //console.log('Websocket connected'); setIsConnected(true); }, (error) => { - console.error('WebSocket Connection Error:', error); + //console.error('WebSocket Connection Error:', error); setIsConnected(false); setTimeout(connectWebSocket, 5000); } @@ -176,14 +175,12 @@ const NotificationsSidebar = () => { }; const subscribeTo = (topic) => { - console.log('subscribeTo', topic) const subscription = stomp.current.subscribe( topic, (message) => { try { const notification = JSON.parse(message.body); - console.log('notification', notification) - //setNotifications(prev => [notification, ...prev]); + setNotifications(prev => [notification, ...prev]); } catch (error) { console.error('Error parsing notification:', error); } @@ -208,7 +205,7 @@ const NotificationsSidebar = () => { if (stomp.current) { stomp.current.disconnect(() => { - console.log('WebSocket Disconnected'); + //console.log('WebSocket Disconnected'); }); } };