@@ -30,7 +30,7 @@ interface Props extends UIKitFeaturesInSendbirdChatContext, React.PropsWithChild
3030 imageCompressionConfig : ImageCompressionConfig ;
3131}
3232
33- type Context = {
33+ export type SendbirdChatContextType = {
3434 sdk : SendbirdChatSDK ;
3535 emojiManager : EmojiManager ;
3636 mentionManager : MentionManager ;
@@ -59,7 +59,7 @@ type Context = {
5959 } ;
6060} ;
6161
62- export const SendbirdChatContext = React . createContext < Context | null > ( null ) ;
62+ export const SendbirdChatContext = React . createContext < SendbirdChatContextType | null > ( null ) ;
6363export const SendbirdChatProvider = ( {
6464 children,
6565 sdkInstance,
@@ -77,13 +77,13 @@ export const SendbirdChatProvider = ({
7777 const forceUpdate = useForceUpdate ( ) ;
7878 const appFeatures = useAppFeatures ( sdkInstance ) ;
7979
80- const setCurrentUser : Context [ 'setCurrentUser' ] = useCallback ( ( user ) => {
80+ const setCurrentUser : SendbirdChatContextType [ 'setCurrentUser' ] = useCallback ( ( user ) => {
8181 // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser
8282 _setCurrentUser ( user ) ;
8383 forceUpdate ( ) ;
8484 } , [ ] ) ;
8585
86- const updateCurrentUserInfo : Context [ 'updateCurrentUserInfo' ] = useCallback (
86+ const updateCurrentUserInfo : SendbirdChatContextType [ 'updateCurrentUserInfo' ] = useCallback (
8787 async ( nickname , profile ) => {
8888 let user = currentUser ;
8989
@@ -115,7 +115,7 @@ export const SendbirdChatProvider = ({
115115 [ sdkInstance , currentUser , setCurrentUser ] ,
116116 ) ;
117117
118- const markAsDeliveredWithChannel : Context [ 'markAsDeliveredWithChannel' ] = useCallback (
118+ const markAsDeliveredWithChannel : SendbirdChatContextType [ 'markAsDeliveredWithChannel' ] = useCallback (
119119 ( channel : SendbirdGroupChannel ) => {
120120 if ( appFeatures . deliveryReceiptEnabled ) confirmAndMarkAsDelivered ( [ channel ] ) ;
121121 } ,
@@ -128,7 +128,7 @@ export const SendbirdChatProvider = ({
128128 else if ( status === 'background' ) sdkInstance . connectionState === 'OPEN' && sdkInstance . setBackgroundState ( ) ;
129129 } ) ;
130130
131- const value : Context = {
131+ const value : SendbirdChatContextType = {
132132 sdk : sdkInstance ,
133133 emojiManager,
134134 mentionManager,
0 commit comments