diff --git a/src/components/MessageList/VirtualizedMessageList.tsx b/src/components/MessageList/VirtualizedMessageList.tsx
index 7a8f1366e..d80d66860 100644
--- a/src/components/MessageList/VirtualizedMessageList.tsx
+++ b/src/components/MessageList/VirtualizedMessageList.tsx
@@ -37,7 +37,6 @@ import {
calculateFirstItemIndex,
calculateItemIndex,
EmptyPlaceholder,
- Footer,
Header,
Item,
makeItemsRenderedHandler,
@@ -232,6 +231,7 @@ const VirtualizedMessageListWithContext = <
UnreadMessagesNotification = DefaultUnreadMessagesNotification,
UnreadMessagesSeparator,
VirtualMessage: MessageUIComponentFromContext = MessageSimple,
+ TypingIndicator,
} = useComponentContext('VirtualizedMessageList');
const MessageUIComponent = MessageUIComponentFromProps || MessageUIComponentFromContext;
@@ -435,7 +435,6 @@ const VirtualizedMessageListWithContext = <
className='str-chat__message-list-scroll'
components={{
EmptyPlaceholder,
- Footer,
Header,
Item,
...virtuosoComponentsFromProps,
@@ -490,6 +489,7 @@ const VirtualizedMessageListWithContext = <
{...(defaultItemHeight ? { defaultItemHeight } : {})}
/>
+ {TypingIndicator && }
);
};
-export const Footer = <
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
->() => {
- const { TypingIndicator } = useComponentContext('VirtualizedMessageList');
- return TypingIndicator ? : null;
-};
+
export const messageRenderer = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
>(
diff --git a/src/components/MessageList/__tests__/VirtualizedMessageListComponents.test.js b/src/components/MessageList/__tests__/VirtualizedMessageListComponents.test.js
index ccb0cc460..13e7cc68a 100644
--- a/src/components/MessageList/__tests__/VirtualizedMessageListComponents.test.js
+++ b/src/components/MessageList/__tests__/VirtualizedMessageListComponents.test.js
@@ -3,7 +3,6 @@ import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import {
EmptyPlaceholder,
- Footer,
Header,
Item,
messageRenderer,
@@ -206,25 +205,6 @@ describe('VirtualizedMessageComponents', () => {
});
});
- describe('Footer', () => {
- it('should render nothing in Footer by default', () => {
- const { container } = renderElements();
- expect(container).toMatchInlineSnapshot(``);
- });
- it('should render custom TypingIndicator in Footer', () => {
- const TypingIndicator = () => Custom TypingIndicator
;
- const componentContext = { TypingIndicator };
- const { container } = renderElements(, componentContext);
- expect(container).toMatchInlineSnapshot(`
-
-
- Custom TypingIndicator
-
-
- `);
- });
- });
-
describe('messageRenderer', () => {
const virtuosoIndex = PREPEND_OFFSET;
const numItemsPrepended = 0;
diff --git a/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageList.test.js.snap b/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageList.test.js.snap
index d26d81f79..5578f8ad0 100644
--- a/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageList.test.js.snap
+++ b/src/components/MessageList/__tests__/__snapshots__/VirtualizedMessageList.test.js.snap
@@ -64,7 +64,6 @@ exports[`VirtualizedMessageList should render the list without any message 1`] =
No chats here yet…
-