diff --git a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx index 3568a4d20..01a4ebe53 100644 --- a/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx +++ b/client/src/components/chat-conversation-list/chat-conversation-list.component.jsx @@ -7,7 +7,7 @@ import {setSelectedConversation} from "../../redux/messaging/messaging.actions"; import {selectSelectedConversation} from "../../redux/messaging/messaging.selectors"; import {TimeAgoFormatter} from "../../utils/DateFormatter"; import PhoneFormatter from "../../utils/PhoneFormatter"; -import OwnerNameDisplay, {OwnerNameDisplayFunction} from "../owner-name-display/owner-name-display.component"; +import {OwnerNameDisplayFunction} from "../owner-name-display/owner-name-display.component"; import _ from "lodash"; import "./chat-conversation-list.styles.scss"; @@ -58,7 +58,16 @@ function ChatConversationListComponent({ )} const cardExtra = - const cardStyle = index % 2 === 0 ? {backgroundColor: '#f0f2f5'} : {backgroundColor: '#ffffff'}; + + const getCardStyle = () => { + if (item.id === selectedConversation) { + return { + backgroundColor: 'rgba(128, 128, 128, 0.2)' + } + } + return index % 2 === 0 ? {backgroundColor: '#f0f2f5'} : {backgroundColor: '#ffffff'}; + } + return ( - +
{cardContentLeft}
-
{cardContentRight}
+
{cardContentRight}
diff --git a/client/src/components/chat-conversation-list/chat-conversation-list.styles.scss b/client/src/components/chat-conversation-list/chat-conversation-list.styles.scss index a63474c04..7915c5c2a 100644 --- a/client/src/components/chat-conversation-list/chat-conversation-list.styles.scss +++ b/client/src/components/chat-conversation-list/chat-conversation-list.styles.scss @@ -1,6 +1,3 @@ -.chat-list-selected-conversation { - background-color: rgba(128, 128, 128, 0.2); -} .chat-list-container { overflow: hidden; height: 100%;