diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index ceb146a..9257103 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -165,11 +165,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { */ useEffect(() => { - if (isMobile) { - setNavOpen(false); - return; - } - setNavOpen(true); + setNavOpen(!isMobile); }, [isMobile]); return ( @@ -232,19 +228,15 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {

New Chat

- {conversations - ? conversations.map((conversation) => ( - handleConversationClick(id)} - onDeleteConversation={(id) => handleDeleteConversation(id)} - onSave={(conversation) => - updateConversationName(conversation) - } - /> - )) - : null} + {conversations?.map((conversation) => ( + handleConversationClick(id)} + onDeleteConversation={(id) => handleDeleteConversation(id)} + onSave={(conversation) => updateConversationName(conversation)} + /> + ))}
@@ -289,7 +281,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {

{doc.name} {doc.version}

- {doc.location === 'local' ? ( + {doc.location === 'local' && ( Exit - ) : null} + )} ); } diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 87a5ebb..503c4d5 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -39,11 +39,7 @@ export default function Conversation() { useEffect(() => { const observerCallback: IntersectionObserverCallback = (entries) => { entries.forEach((entry) => { - if (entry.isIntersecting) { - setHasScrolledToLast(true); - } else { - setHasScrolledToLast(false); - } + setHasScrolledToLast(entry.isIntersecting); }); }; @@ -121,7 +117,7 @@ export default function Conversation() { return (
- {queries.length > 0 && !hasScrolledToLast ? ( + {queries.length > 0 && !hasScrolledToLast && ( - ) : null} + )} {queries.length > 0 && (
diff --git a/frontend/src/conversation/ConversationTile.tsx b/frontend/src/conversation/ConversationTile.tsx index 0db3f1b..1b5dc42 100644 --- a/frontend/src/conversation/ConversationTile.tsx +++ b/frontend/src/conversation/ConversationTile.tsx @@ -92,7 +92,7 @@ export default function ConversationTile({

)}
- {conversationId === conversation.id ? ( + {conversationId === conversation.id && (
- ) : null} + )}
); }