From 53456382cf06fae4bc55b4e32149dac38d445280 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Tue, 9 Apr 2024 10:43:45 +0530 Subject: [PATCH] fixed the position of error banner --- .../Chat/ChatMessages/ChatMessages.module.css | 18 ++++++----- .../Chat/ChatMessages/ChatMessages.tsx | 30 +++++++++++-------- .../StatusBar/StatusBar.module.css | 5 ++-- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/containers/Chat/ChatMessages/ChatMessages.module.css b/src/containers/Chat/ChatMessages/ChatMessages.module.css index 538dcba0c..b340321ac 100644 --- a/src/containers/Chat/ChatMessages/ChatMessages.module.css +++ b/src/containers/Chat/ChatMessages/ChatMessages.module.css @@ -34,12 +34,14 @@ padding-left: 0px !important; padding-right: 0px !important; height: calc(100% - 175px); + position: relative; } .NoMessages { - padding-top: 11.5px !important; - padding-left: 24px !important; - height: calc(100% - 175px); + height: 100%; + display: flex; + align-items: center; + justify-content: center; } .Chip { @@ -50,6 +52,7 @@ background-color: #eaedec !important; padding-right: 3px !important; } + .Form { height: 18vh !important; width: 100%; @@ -69,11 +72,12 @@ width: 8px !important; margin-right: 13px !important; } -.Paper > ul > li:hover { + +.Paper>ul>li:hover { background-color: #edf6f2 !important; } -.Paper > ul > li { +.Paper>ul>li { color: #073f24; } @@ -127,7 +131,7 @@ html { align-items: center; } -.SessionTimer + div { +.SessionTimer+div { text-align: right; } @@ -136,4 +140,4 @@ html { font-size: 12px; font-weight: 400; margin-right: 5px; -} +} \ No newline at end of file diff --git a/src/containers/Chat/ChatMessages/ChatMessages.tsx b/src/containers/Chat/ChatMessages/ChatMessages.tsx index e0a4840f6..7d362d0ca 100644 --- a/src/containers/Chat/ChatMessages/ChatMessages.tsx +++ b/src/containers/Chat/ChatMessages/ChatMessages.tsx @@ -617,19 +617,14 @@ export const ChatMessages = ({ entityId, collectionId, phoneId }: ChatMessagesPr } }, [scrollToMessageNumber]); - let messageListContainer; + let chatMessages; // Check if there are conversation messages else display no messages if (messageList) { const loadMoreOption = conversationInfo.messages?.length > DEFAULT_MESSAGE_LIMIT - 1 || (searchMessageNumber && searchMessageNumber > 19); - messageListContainer = ( - + chatMessages = ( + <> {showLoadMore && loadMoreOption && (
{conversationLoad ? ( @@ -649,16 +644,28 @@ export const ChatMessages = ({ entityId, collectionId, phoneId }: ChatMessagesPr )} {messageList} - + ); } else { - messageListContainer = ( + chatMessages = (
{t('No messages.')}
); } + const messageListContainr = ( + + + {chatMessages} + + ); + const handleChatClearedAction = () => { const conversationInfoCopy = JSON.parse(JSON.stringify(conversationInfo)); conversationInfoCopy.messages = []; @@ -807,8 +814,7 @@ export const ChatMessages = ({ entityId, collectionId, phoneId }: ChatMessagesPr /> ) : null} {topChatBar} - - {messageListContainer} + {messageListContainr} {chatInputSection} ); diff --git a/src/containers/Chat/ChatMessages/StatusBar/StatusBar.module.css b/src/containers/Chat/ChatMessages/StatusBar/StatusBar.module.css index 000284c8d..a27c7cba9 100644 --- a/src/containers/Chat/ChatMessages/StatusBar/StatusBar.module.css +++ b/src/containers/Chat/ChatMessages/StatusBar/StatusBar.module.css @@ -2,11 +2,12 @@ background-color: #dd1f1f; color: #edf6f2; padding: 12px 36px; - position: absolute; + position: sticky; width: 100%; z-index: 1; + top: -12px; } .StatusTitle { font-weight: bold; -} +} \ No newline at end of file