Skip to content

Commit 3be7492

Browse files
committed
fix: remove isCommandUIEnabled prop
1 parent 679504d commit 3be7492

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
573573
Gallery = GalleryDefault,
574574
getMessagesGroupStyles,
575575
Giphy = GiphyDefault,
576-
isCommandUIEnabled,
577576
giphyVersion = 'fixed_height',
578577
handleAttachButtonPress,
579578
handleBan,
@@ -1778,7 +1777,6 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
17781777
InputButtons,
17791778
InputEditingStateHeader,
17801779
InputReplyStateHeader,
1781-
isCommandUIEnabled: isCommandUIEnabled ?? !!clientChannelConfig?.commands?.length,
17821780
MoreOptionsButton,
17831781
openPollCreationDialog,
17841782
SendButton,

package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const useCreateInputMessageInputContext = ({
5050
InputButtons,
5151
InputEditingStateHeader,
5252
InputReplyStateHeader,
53-
isCommandUIEnabled,
5453
MoreOptionsButton,
5554
openPollCreationDialog,
5655
SendButton,
@@ -117,7 +116,6 @@ export const useCreateInputMessageInputContext = ({
117116
InputButtons,
118117
InputEditingStateHeader,
119118
InputReplyStateHeader,
120-
isCommandUIEnabled,
121119
MoreOptionsButton,
122120
openPollCreationDialog,
123121
SendButton,

package/src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,6 @@ export type InputMessageInputContextValue = {
292292
*/
293293
ImageUploadPreview: React.ComponentType<ImageUploadPreviewProps>;
294294
InputEditingStateHeader: React.ComponentType<InputEditingStateHeaderProps>;
295-
/**
296-
* Boolean value to determine if the input should show a command UI.
297-
*/
298-
isCommandUIEnabled?: boolean;
299295
CommandInput: React.ComponentType<CommandInputProps>;
300296
InputReplyStateHeader: React.ComponentType;
301297
/**
@@ -468,13 +464,7 @@ export const MessageInputProvider = ({
468464
createDraftAttachmentsCompositionMiddleware(messageComposer),
469465
]);
470466
}
471-
}, [
472-
value.doFileUploadRequest,
473-
value.isCommandUIEnabled,
474-
enableOfflineSupport,
475-
messageComposer,
476-
attachmentManager,
477-
]);
467+
}, [value.doFileUploadRequest, enableOfflineSupport, messageComposer, attachmentManager]);
478468

479469
/**
480470
* Function for capturing a photo and uploading it

package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export const useCreateMessageInputContext = ({
4040
FileAttachmentUploadPreview,
4141
FileSelectorIcon,
4242
FileUploadPreview,
43-
isCommandUIEnabled,
4443
handleAttachButtonPress,
4544
hasCameraPicker,
4645
hasCommands,
@@ -130,7 +129,6 @@ export const useCreateMessageInputContext = ({
130129
InputButtons,
131130
InputEditingStateHeader,
132131
InputReplyStateHeader,
133-
isCommandUIEnabled,
134132
MoreOptionsButton,
135133
openAttachmentPicker,
136134
openFilePicker,
@@ -154,7 +152,7 @@ export const useCreateMessageInputContext = ({
154152
VideoRecorderSelectorIcon,
155153
}),
156154
// eslint-disable-next-line react-hooks/exhaustive-deps
157-
[cooldownEndsAt, isCommandUIEnabled, threadId, showPollCreationDialog, selectedPicker],
155+
[cooldownEndsAt, threadId, showPollCreationDialog, selectedPicker],
158156
);
159157

160158
return messageInputContext;

0 commit comments

Comments
 (0)