diff --git a/src/app/pages/call/PersistentCallContainer.tsx b/src/app/pages/call/PersistentCallContainer.tsx index f244150e..567a72ea 100644 --- a/src/app/pages/call/PersistentCallContainer.tsx +++ b/src/app/pages/call/PersistentCallContainer.tsx @@ -28,7 +28,16 @@ interface PersistentCallContainerProps { viewedRoomId: string; } -export function PersistentCallContainer({ isVisible, viewedRoomId }: PersistentCallContainerProps) { +export function PersistentCallContainer({ + isVisible, + viewedRoomId, + iframeRef, + widgetApiRef, + smallWidgetRef, + backupIframeRef, + backupWidgetApiRef, + backupSmallWidgetRef, +}: PersistentCallContainerProps) { const { activeCallRoomId, isChatOpen, @@ -51,14 +60,6 @@ export function PersistentCallContainer({ isVisible, viewedRoomId }: PersistentC logger.info(room); - const iframeRef = useRef(null); - const widgetApiRef = useRef(null); - const smallWidgetRef = useRef(null); - - const backupIframeRef = useRef(null); - const backupWidgetApiRef = useRef(null); - const backupSmallWidgetRef = useRef(null); - const setupWidget = (widgetApiRef, smallWidgetRef, iframeRef, skipLobby) => { const cleanupRoomId = smallWidgetRef.current?.roomId; logger.debug(`PersistentCallContainer effect running. activeCallRoomId: ${activeCallRoomId}`); @@ -171,95 +172,58 @@ export function PersistentCallContainer({ isVisible, viewedRoomId }: PersistentC }; return ( - - - {activeCallRoomId && roomId && room !== null && ( - - - - - - } - /> - - - )} - + + - {activeCallRoomId && roomId && room !== null && ( - - - - - - )} - -