From 5a33953b788fd7211c923cd3d7487f1a6e2aa35c Mon Sep 17 00:00:00 2001 From: Lakshmi Narayanan Date: Mon, 30 Oct 2023 10:14:40 +0400 Subject: [PATCH] Add Chats heading if there are any conversations --- frontend/src/Navigation.tsx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 31a27178..59ef4af7 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -232,19 +232,21 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {

New Chat

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

Chats

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