diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx
index e236b8a3..f9fea0f2 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' && (
- ) : null}
+ )}
);
}
diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx
index 87a5ebb7..503c4d56 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 592c52b2..5799f449 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}
+ )}
);
}