Skip to content

Commit

Permalink
implemented space for search (#2637)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mav-Ivan authored Nov 11, 2024
1 parent 8756945 commit e2ed728
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/pages/chat/Chat.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/chat/MessagesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const MessagesList = ({

const groupedMessages = getGroupedByDate(messages, getIsNewDay)
const messagesListWithDate = groupedMessages.map((group, groupIndex) => (
<Box key={group.date} sx={styles.messagesWithDate}>
<Box key={group.date} sx={styles.messagesWithDate(groupIndex)}>
<ChatDate date={group.date} />
{group.items.map((item, messageIndex) => {
if (messageIndex === 0 && groupIndex === 0) {
Expand Down

0 comments on commit e2ed728

Please sign in to comment.