File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
src/components/MessageInput Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { SendIcon } from './icons' ;
33import { useMessageComposerHasSendableData } from './hooks' ;
4- import type { UpdatedMessage } from 'stream-chat' ;
54import { useTranslationContext } from '../../context' ;
65
76export type SendButtonProps = {
8- sendMessage : (
9- event : React . BaseSyntheticEvent ,
10- customMessageData ?: Omit < UpdatedMessage , 'mentioned_users' > ,
11- ) => void ;
7+ sendMessage : ( event : React . BaseSyntheticEvent ) => void ;
128} & React . ComponentProps < 'button' > ;
9+
1310export const SendButton = ( { sendMessage, ...rest } : SendButtonProps ) => {
1411 const { t } = useTranslationContext ( ) ;
1512 const hasSendableData = useMessageComposerHasSendableData ( ) ;
Original file line number Diff line number Diff line change @@ -2,16 +2,12 @@ import type React from 'react';
22import { useTextareaRef } from './useTextareaRef' ;
33import { useSubmitHandler } from './useSubmitHandler' ;
44import { usePasteHandler } from './usePasteHandler' ;
5- import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder' ;
65import type { RecordingController } from '../../MediaRecorder/hooks/useMediaRecorder' ;
7- import type { UpdatedMessage } from 'stream-chat ' ;
6+ import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder ' ;
87import type { MessageInputProps } from '../MessageInput' ;
98
109export type MessageInputHookProps = {
11- handleSubmit : (
12- event ?: React . BaseSyntheticEvent ,
13- customMessageData ?: Omit < UpdatedMessage , 'mentioned_users' > ,
14- ) => void ;
10+ handleSubmit : ( event ?: React . BaseSyntheticEvent ) => void ;
1511 onPaste : ( event : React . ClipboardEvent < HTMLTextAreaElement > ) => void ;
1612 recordingController : RecordingController ;
1713 textareaRef : React . MutableRefObject < HTMLTextAreaElement | null | undefined > ;
You can’t perform that action at this time.
0 commit comments