diff --git a/services/web/frontend/js/features/chat/components/message-list.js b/services/web/frontend/js/features/chat/components/message-list.js index 310d7fd34a..19c085272d 100644 --- a/services/web/frontend/js/features/chat/components/message-list.js +++ b/services/web/frontend/js/features/chat/components/message-list.js @@ -13,10 +13,6 @@ function formatTimestamp(date) { } } -function indexFromEnd(list, index) { - return list.length - index - 1 -} - function MessageList({ messages, resetUnreadMessages, userId }) { function shouldRenderDate(messageIndex) { if (messageIndex === 0) { @@ -37,7 +33,7 @@ function MessageList({ messages, resetUnreadMessages, userId }) { > {messages.map((message, index) => ( // new messages are added to the beginning of the list, so we use a reversed index -
  • +
  • {shouldRenderDate(index) && (