Skip to content

Commit

Permalink
fix: on chat date grouping with locale date format
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-into committed Apr 16, 2024
1 parent baa8043 commit 570a83d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const Conversations = ({
},
]}
>
{moment(separatorDate).format("YYYY, MMM DD")}
{moment(separatorDate).format("L")}
</BrandText>
</View>
);
Expand All @@ -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;
Expand Down

0 comments on commit 570a83d

Please sign in to comment.