Skip to content

Commit

Permalink
Update Navigation.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsh-jha-dev authored Oct 26, 2023
1 parent d255e52 commit 4afdc5f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
}, [isMobile]);

// Filter conversations based on the search query
const filteredConversations = conversations.filter((conversation) => {
const search = searchQuery.toLowerCase();
return conversation.name.toLowerCase().includes(search);
});

const filteredConversations = conversations
? conversations.filter((conversation) => {
const search = searchQuery.toLowerCase();
return conversation.name.toLowerCase().includes(search);
})
: [];

return (
<>
Expand Down

0 comments on commit 4afdc5f

Please sign in to comment.