import ReactDOM from "react-dom"; interface ConversationPanelWrapperProps { isOpen: boolean; } export function ConversationPanelWrapper({ isOpen, children, }: React.PropsWithChildren) { if (!isOpen) return null; const portalTarget = document.getElementById("root-outlet"); if (!portalTarget) return null; return ReactDOM.createPortal(
{children}
, portalTarget, ); }