From 59adcdb286222c191d02733c11e9aa16a203f4e8 Mon Sep 17 00:00:00 2001 From: Igor Berlenko Date: Fri, 24 Feb 2023 17:13:56 +0800 Subject: [PATCH] fix: subscribe to post events when switching discussion otherwise it doesn't handle post events on discussion pages any others than initial one until manual page refresh --- saas/app/pages/discussion.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/saas/app/pages/discussion.tsx b/saas/app/pages/discussion.tsx index 497b509df..a33b8faa5 100644 --- a/saas/app/pages/discussion.tsx +++ b/saas/app/pages/discussion.tsx @@ -90,6 +90,8 @@ function DiscussionPageCompFunctional({ if (discussion) { discussion.joinSocketRooms(); } + + store.socket.on('postEvent', handlePostEvent); } return () => {