From 022c32f9d5ad363231f4379e3fc0983a242c963e Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 24 Nov 2023 12:22:34 +0000 Subject: [PATCH] fix chats display --- frontend/src/Navigation.tsx | 82 +++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 7133dd69..d3df8b44 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -215,45 +215,49 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { /> - { - dispatch(setConversation([])); - dispatch( - updateConversationId({ - query: { conversationId: null }, - }), - ); - }} - className={({ isActive }) => - `${ - isActive ? 'bg-gray-3000' : '' - } group my-auto mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000` - } - > - new -

- New Chat -

-
- {conversations && ( -
-

Chats

- {conversations?.map((conversation) => ( - handleConversationClick(id)} - onDeleteConversation={(id) => handleDeleteConversation(id)} - onSave={(conversation) => updateConversationName(conversation)} - /> - ))} -
- )} +
+ { + dispatch(setConversation([])); + dispatch( + updateConversationId({ + query: { conversationId: null }, + }), + ); + }} + className={({ isActive }) => + `${ + isActive ? 'bg-gray-3000' : '' + } group mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000` + } + > + new +

+ New Chat +

+
+ {conversations && ( +
+

Chats

+ {conversations?.map((conversation) => ( + handleConversationClick(id)} + onDeleteConversation={(id) => handleDeleteConversation(id)} + onSave={(conversation) => + updateConversationName(conversation) + } + /> + ))} +
+ )} +