From 661c48d6eedba8ca539317f5c2b9f8ecc969aac7 Mon Sep 17 00:00:00 2001 From: Ivan Pegashev Date: Thu, 16 May 2024 01:00:42 +0300 Subject: [PATCH] feat(chat): show time of message in history --- webviews/src/routes/chatsHistory/index.tsx | 23 ++++++++++++++----- .../src/routes/chatsHistory/style.module.css | 5 ++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/webviews/src/routes/chatsHistory/index.tsx b/webviews/src/routes/chatsHistory/index.tsx index 63e0536..ec51539 100644 --- a/webviews/src/routes/chatsHistory/index.tsx +++ b/webviews/src/routes/chatsHistory/index.tsx @@ -32,12 +32,23 @@ const ChatsHistory = () => { {chats.reverse().map((chat) => (

{chat.title}

- navigate(`/chats/${chat.chatId}`)} - > - Open Chat - +
+ navigate(`/chats/${chat.chatId}`)} + > + Open Chat + +

+ {new Date(chat.date).toLocaleString(undefined, { + month: "short", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + })} +

+
))} diff --git a/webviews/src/routes/chatsHistory/style.module.css b/webviews/src/routes/chatsHistory/style.module.css index 12dee54..8913312 100644 --- a/webviews/src/routes/chatsHistory/style.module.css +++ b/webviews/src/routes/chatsHistory/style.module.css @@ -17,3 +17,8 @@ align-items: center; padding: 16px; } + +.chatHistoryChatButtons { + display: flex; + flex-direction: column; +}