From 690e65df0b3065d4a5335ca6002684d25419368a Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Tue, 16 Jan 2024 14:14:00 -0500 Subject: [PATCH] - A little refactor cleanup Signed-off-by: Dave Richer --- .../chat-conversation-list.component.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 01a4ebe53..3e47943e2 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 @@ -59,14 +59,10 @@ function ChatConversationListComponent({ const cardExtra = - const getCardStyle = () => { - if (item.id === selectedConversation) { - return { - backgroundColor: 'rgba(128, 128, 128, 0.2)' - } - } - return index % 2 === 0 ? {backgroundColor: '#f0f2f5'} : {backgroundColor: '#ffffff'}; - } + const getCardStyle = () => + item.id === selectedConversation + ? { backgroundColor: 'rgba(128, 128, 128, 0.2)' } + : { backgroundColor: index % 2 === 0 ? '#f0f2f5' : '#ffffff' }; return (