mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-18 14:33:24 +00:00
07ed4d701c
Prevent PiP actions from affecting main panel state and reduce PiP-only noise.
22 lines
630 B
TypeScript
22 lines
630 B
TypeScript
import type { ReactNode } from 'react'
|
|
|
|
import { DocumentPiPPortal } from './DocumentPiPPortal'
|
|
import { PipView } from './PipView'
|
|
import { useRoomPiP } from '../hooks/useRoomPiP'
|
|
|
|
/**
|
|
* Wrapper that mounts the PiP UI when room-level PiP state is enabled.
|
|
* Bridges Valtio-backed PiP state with DocumentPiPPortal and PipView rendering.
|
|
* PiP panel state is decoupled via explicit pipLayoutStore injection.
|
|
*/
|
|
export const RoomPiP = (): ReactNode => {
|
|
const { isOpen, close } = useRoomPiP()
|
|
|
|
const portal = DocumentPiPPortal({
|
|
isOpen,
|
|
onClose: close,
|
|
children: <PipView />,
|
|
})
|
|
return portal as ReactNode
|
|
}
|