From 9a33f0cd7cbdda626e1cbbe86a1a0385014c5346 Mon Sep 17 00:00:00 2001 From: Sachin Date: Tue, 16 Apr 2024 16:25:34 +0545 Subject: [PATCH] fix: on chat date grouping with locale date format --- .../screens/Mini/Conversation/components/Conversations.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/screens/Mini/Conversation/components/Conversations.tsx b/packages/screens/Mini/Conversation/components/Conversations.tsx index 12351e3049..e57736a203 100644 --- a/packages/screens/Mini/Conversation/components/Conversations.tsx +++ b/packages/screens/Mini/Conversation/components/Conversations.tsx @@ -144,7 +144,7 @@ export const Conversations = ({ }, ]} > - {moment(separatorDate).format("YYYY, MMM DD")} + {moment(separatorDate).format("L")} ); @@ -167,8 +167,8 @@ export const Conversations = ({ index < messages.length - 1 ? messages[index + 1] : undefined; const separatorDate = previousMessage - ? moment(item.timestamp).format("DD/MM/YYYY") === - moment(previousMessage.timestamp).format("DD/MM/YYYY") + ? moment(item.timestamp).format("L") === + moment(previousMessage.timestamp).format("L") ? false : item?.timestamp : item.timestamp;