1- import { MouseEventHandler , useCallback , useEffect , useRef , useState } from 'react' ;
1+ import { MouseEventHandler , useCallback , useRef , useState } from 'react' ;
22import {
33 Box ,
44 Button ,
@@ -15,13 +15,7 @@ import {
1515 toRem ,
1616} from 'folds' ;
1717import FocusTrap from 'focus-trap-react' ;
18- import { SequenceCard } from '$components/sequence-card' ;
19- import { CallEmbed , useCallControlState } from '$plugins/call' ;
20- import { stopPropagation } from '$utils/keyboard' ;
21- import { AsyncStatus , useAsyncCallback } from '$hooks/useAsyncCallback' ;
22- import { useRoom } from '$hooks/useRoom' ;
23- import { ScreenSize , useScreenSizeContext } from '$hooks/useScreenSize' ;
24- import { useCallPreferences } from '$state/hooks/callPreferences' ;
18+ import { SequenceCard } from '../../components/sequence-card' ;
2519import * as css from './styles.css' ;
2620import {
2721 ChatButton ,
@@ -31,6 +25,11 @@ import {
3125 SoundButton ,
3226 VideoButton ,
3327} from './Controls' ;
28+ import { CallEmbed , useCallControlState } from '../../plugins/call' ;
29+ import { stopPropagation } from '../../utils/keyboard' ;
30+ import { AsyncStatus , useAsyncCallback } from '../../hooks/useAsyncCallback' ;
31+ import { useRoom } from '../../hooks/useRoom' ;
32+ import { ScreenSize , useScreenSizeContext } from '../../hooks/useScreenSize' ;
3433
3534type CallControlsProps = {
3635 callEmbed : CallEmbed ;
@@ -46,12 +45,6 @@ export function CallControls({ callEmbed }: CallControlsProps) {
4645 callEmbed . control
4746 ) ;
4847
49- const { setPreferences } = useCallPreferences ( ) ;
50-
51- useEffect ( ( ) => {
52- setPreferences ( { microphone, video, sound } ) ;
53- } , [ microphone , video , sound , setPreferences ] ) ;
54-
5548 const [ cords , setCords ] = useState < RectCords > ( ) ;
5649
5750 const handleOpenMenu : MouseEventHandler < HTMLButtonElement > = ( evt ) => {
0 commit comments