diff --git a/src/components/chat/chatTabs.tsx b/src/components/chat/chatTabs.tsx index 0fe84481..ebdd86bd 100644 --- a/src/components/chat/chatTabs.tsx +++ b/src/components/chat/chatTabs.tsx @@ -132,7 +132,7 @@ const ChatTabs = () => {

- Public Chat + {selectedChatOption === 'public' ? 'Public Chat' : 'Private Chat'}

EN diff --git a/src/components/chat/messages/message/index.tsx b/src/components/chat/messages/message/index.tsx index d4819982..b96a591a 100644 --- a/src/components/chat/messages/message/index.tsx +++ b/src/components/chat/messages/message/index.tsx @@ -18,6 +18,15 @@ const Message = ({ body, currentUser }: IMessageProps) => { ); const { t } = useTranslation(); + const formatDate = (timeStamp: string) => { + const date = new Date(Number(timeStamp)); + return date.toLocaleString([], { + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + }); + }; + const render = () => { if (body.fromUserId === 'system') { return ( @@ -38,7 +47,9 @@ const Message = ({ body, currentUser }: IMessageProps) => {

{t('right-panel.you')}

-

8:37AM

+

+ {formatDate(body.sentAt)} +

{ {participantName ? '' : ' (offline)'}

-

8:37AM

+

+ {' '} + {formatDate(body.sentAt)} +