mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 19:20:28 +03:00
swap to using ref provider context from to connect to persistentcallcontainer more directly
This commit is contained in:
parent
eea8ffea05
commit
807c90e2f5
1 changed files with 3 additions and 3 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { Room } from 'matrix-js-sdk';
|
||||
import React, { useMemo } from 'react';
|
||||
import React, { useContext, useMemo } from 'react';
|
||||
import { useCallback, useEffect, useRef } from 'react';
|
||||
import { useOutletContext } from 'react-router-dom';
|
||||
import { Box } from 'folds';
|
||||
import { RoomViewHeader } from './RoomViewHeader';
|
||||
import { useCallState } from '../../pages/client/CallProvider';
|
||||
import { RefContext } from '../../pages/call/PersistentCallContainer';
|
||||
|
||||
function debounce<F extends (...args: any[]) => any>(func: F, waitFor: number) {
|
||||
let timeoutId: ReturnType<typeof setTimeout> | null = null;
|
||||
|
|
@ -35,7 +35,7 @@ interface CallViewOutletContext {
|
|||
}
|
||||
|
||||
export function CallView({ room, eventId }: { room: Room; eventId?: string }) {
|
||||
const { iframeRef, backupIframeRef } = useOutletContext<CallViewOutletContext>();
|
||||
const { iframeRef, backupIframeRef } = useContext(RefContext);
|
||||
const iframeHostRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const originalIframeStylesRef = useRef<OriginalStyles | null>(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue