Просмотр исходного кода

getting socket data on the client side

kaori 4 лет назад
Родитель
Сommit
fbefe1f07f
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      packages/app/src/components/PageEditor/InAppNotificationDropdown.tsx

+ 6 - 2
packages/app/src/components/PageEditor/InAppNotificationDropdown.tsx

@@ -30,10 +30,14 @@ const InAppNotificationDropdown: FC = (props) => {
 
 
     const socket = props.socketIoContainer.getSocket();
     const socket = props.socketIoContainer.getSocket();
     socket.on('comment updated', (data: { user: string }) => {
     socket.on('comment updated', (data: { user: string }) => {
-      console.log('socket', socket);
-      // props.crowi.getWebSocket().on('comment updated', (data: { user: string }) => {
+      // eslint-disable-next-line no-console
+      console.log('socketData', data);
+
       if (props.me === data.user) {
       if (props.me === data.user) {
+        // TODO: Fetch notification status by GW-7473
         // fetchNotificationList();
         // fetchNotificationList();
+
+        // TODO: Fetch notification list by GW-7473
         // fetchNotificationStatus();
         // fetchNotificationStatus();
       }
       }
     });
     });