@@ -22,7 +22,6 @@ import useOnlineStatus from './hooks/useOnlineStatus';
2222import useConnect from './hooks/useConnect' ;
2323import { LoggerFactory , LogLevel } from './Logger' ;
2424import pubSubFactory from './pubSub/index' ;
25- import useAppendDomNode from '../hooks/useAppendDomNode' ;
2625
2726import { VoiceMessageProvider } from './VoiceMessageProvider' ;
2827import { LocalizationProvider } from './LocalizationContext' ;
@@ -48,12 +47,13 @@ import {
4847 CustomExtensionParams ,
4948 SBUEventHandlers , SendbirdProviderUtils ,
5049} from './types' ;
51- import { GlobalModalProvider } from '../hooks/useModal' ;
50+ import { GlobalModalProvider , ModalRoot } from '../hooks/useModal' ;
5251import { RenderUserProfileProps } from '../types' ;
5352import PUBSUB_TOPICS , { SBUGlobalPubSub , SBUGlobalPubSubTopicPayloadUnion } from './pubSub/topics' ;
5453import { EmojiManager } from './emojiManager' ;
5554import { uikitConfigStorage } from './utils/uikitConfigStorage' ;
5655import useMessageTemplateUtils from './hooks/useMessageTemplateUtils' ;
56+ import { EmojiReactionListRoot , MenuRoot } from '../ui/ContextMenu' ;
5757
5858export { useSendbirdStateContext } from '../hooks/useSendbirdStateContext' ;
5959
@@ -257,12 +257,6 @@ const SendbirdSDK = ({
257257 setLogger ( LoggerFactory ( logLevel as LogLevel ) ) ;
258258 } , [ logLevel ] ) ;
259259
260- useAppendDomNode ( [
261- 'sendbird-modal-root' ,
262- 'sendbird-dropdown-portal' ,
263- 'sendbird-emoji-list-portal' ,
264- ] , 'body' ) ;
265-
266260 // should move to reducer
267261 const [ currentTheme , setCurrentTheme ] = useState ( theme ) ;
268262 useEffect ( ( ) => {
@@ -429,6 +423,10 @@ const SendbirdSDK = ({
429423 </ VoiceMessageProvider >
430424 </ LocalizationProvider >
431425 </ MediaQueryProvider >
426+ { /* Roots */ }
427+ < EmojiReactionListRoot />
428+ < ModalRoot />
429+ < MenuRoot />
432430 </ SendbirdSdkContext . Provider >
433431 ) ;
434432} ;
0 commit comments