Skip to content

Commit

Permalink
fix: poll only in large room
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Sep 28, 2023
1 parent 9c590ba commit 84591a8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ export const RoleAccordion = ({
const isOffStageRole = roleName && offStageRoles.includes(roleName);

useEffect(() => {
if (!isOffStageRole) {
if (!isOffStageRole || !isLargeRoom) {
return;
}
loadPeers();
const interval = setInterval(() => {
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;
Expand Down

0 comments on commit 84591a8

Please sign in to comment.