From 84591a898b79f6fe2c555b534871c5706c154cd8 Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Thu, 28 Sep 2023 16:57:14 +0530 Subject: [PATCH] fix: poll only in large room --- .../src/Prebuilt/components/Footer/RoleAccordion.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx index 612dba2428..20fe76e1b2 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Footer/RoleAccordion.tsx @@ -50,7 +50,7 @@ export const RoleAccordion = ({ const isOffStageRole = roleName && offStageRoles.includes(roleName); useEffect(() => { - if (!isOffStageRole) { + if (!isOffStageRole || !isLargeRoom) { return; } loadPeers(); @@ -58,7 +58,7 @@ export const RoleAccordion = ({ loadPeers(); }, ITER_TIMER); return () => clearInterval(interval); - }, [isOffStageRole]); //eslint-disable-line + }, [isOffStageRole, isLargeRoom]); //eslint-disable-line if (!showAcordion || (isHandRaisedAccordion && filter?.search) || (peerList.length === 0 && filter?.search)) { return null;