From ddd936643e6e3ec03597397f310426ae2e776b47 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 18 Jul 2024 18:12:14 +0200 Subject: [PATCH] review --- src/room/GroupCallView.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 965b706f..a88d1126 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -80,15 +80,13 @@ export const GroupCallView: FC = ({ const memberships = useMatrixRTCSessionMemberships(rtcSession); const isJoined = useMatrixRTCSessionJoinState(rtcSession); - // this should be useEffectEvent (only available in experimental versions) - const participantMuteOnce = useCallback(() => { + // This should use `useEffectEvent` (only available in experimental versions) + useEffect(() => { if (memberships.length >= MUTE_PARTICIPANT_COUNT) muteStates.audio.setEnabled?.(false); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - useEffect(() => participantMuteOnce(), [participantMuteOnce]); - useEffect(() => { window.rtcSession = rtcSession; return (): void => {