diff --git a/src/pages/chat/Chat.styles.ts b/src/pages/chat/Chat.styles.ts index 230216139..4b7a9f526 100644 --- a/src/pages/chat/Chat.styles.ts +++ b/src/pages/chat/Chat.styles.ts @@ -73,7 +73,10 @@ export const styles = { color: 'primary.400', fontWeight: 500 }), - messagesWithDate: { mb: '24px' }, + messagesWithDate: (groupIndex: number) => ({ + mb: '24px', + mt: groupIndex === 0 ? '70px' : 0 + }), scrollableContent: { height: `calc(100% - 164px)`, overflow: 'auto', diff --git a/src/pages/chat/MessagesList.tsx b/src/pages/chat/MessagesList.tsx index ef8e56134..d8224c0a6 100644 --- a/src/pages/chat/MessagesList.tsx +++ b/src/pages/chat/MessagesList.tsx @@ -82,7 +82,7 @@ const MessagesList = ({ const groupedMessages = getGroupedByDate(messages, getIsNewDay) const messagesListWithDate = groupedMessages.map((group, groupIndex) => ( - + {group.items.map((item, messageIndex) => { if (messageIndex === 0 && groupIndex === 0) {