diff --git a/examples/SampleApp/src/components/NewDirectMessagingSendButton.tsx b/examples/SampleApp/src/components/NewDirectMessagingSendButton.tsx index 557820c63..0d1037e5e 100644 --- a/examples/SampleApp/src/components/NewDirectMessagingSendButton.tsx +++ b/examples/SampleApp/src/components/NewDirectMessagingSendButton.tsx @@ -17,6 +17,8 @@ import { import { NewDirectMessagingScreenNavigationProp } from '../screens/NewDirectMessagingScreen'; import { StreamChatGenerics as LocalStreamChatGenerics } from '../types'; +import { useUserSearchContext } from '../context/UserSearchContext'; +import { useAppContext } from '../context/AppContext'; type NewDirectMessagingSendButtonPropsWithContext< StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, @@ -97,8 +99,10 @@ export type SendButtonProps< * UI Component for send button in MessageInput component. */ export const NewDirectMessagingSendButton = (props: SendButtonProps) => { + const { chatClient } = useAppContext(); const navigation = useNavigation(); const { channel } = useChannelContext(); + const { selectedUserIds, reset } = useUserSearchContext(); const { giphyActive, text } = useMessageInputContext(); @@ -106,15 +110,25 @@ export const NewDirectMessagingSendButton = (props: SendButtonProps