From 14ec271ecf9308b1a348e24cd0ee9d4a91a32473 Mon Sep 17 00:00:00 2001 From: Tyler Brown Cifu Shuster Date: Tue, 27 Oct 2020 17:16:01 -0700 Subject: [PATCH] chat: fixes relative datestamps fixes https://github.com/urbit/landscape/issues/125 --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 1cf993ddf..6979e0bab 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -19,7 +19,7 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => ( New messages below {dayBreak - ? {moment(when).calendar()} + ? {moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })} : null} @@ -27,7 +27,7 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => ( export const DayBreak = ({ when }) => (
-

{moment(when).calendar()}

+

{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}

);