Skip to content

Commit fc547be

Browse files
committed
fix: remove customMessageData from handleSubmit type declaration (#2950)
1 parent 55c9a1a commit fc547be

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

src/components/MessageInput/SendButton.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import React from 'react';
22
import { useMessageComposerHasSendableData } from './hooks';
3-
import type { UpdatedMessage } from 'stream-chat';
43
import { useTranslationContext } from '../../context';
54
import { IconPaperPlane } from '../Icons';
65
import { Button } from '../Button';
76
import clsx from 'clsx';
87

98
export type SendButtonProps = {
10-
sendMessage: (
11-
event: React.BaseSyntheticEvent,
12-
customMessageData?: Omit<UpdatedMessage, 'mentioned_users'>,
13-
) => void;
9+
sendMessage: (event: React.BaseSyntheticEvent) => void;
1410
} & React.ComponentProps<'button'>;
1511

1612
export const SendButton = ({ children, sendMessage, ...rest }: SendButtonProps) => {

src/components/MessageInput/hooks/useMessageInputControls.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@ import type React from 'react';
22
import { useTextareaRef } from './useTextareaRef';
33
import { useSubmitHandler } from './useSubmitHandler';
44
import { usePasteHandler } from './usePasteHandler';
5-
import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder';
65
import type { RecordingController } from '../../MediaRecorder/hooks/useMediaRecorder';
7-
import type { UpdatedMessage } from 'stream-chat';
6+
import { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder';
87
import type { MessageInputProps } from '../MessageInput';
98

109
export 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>;

0 commit comments

Comments
 (0)