Skip to content

Commit

Permalink
auto close sidebar in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-work committed Aug 29, 2024
1 parent faba527 commit 485841a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/shared/Layout/SideNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ const SideNavbar = () => {
isActive={
currentConversationId === conversation?.id
}
onClick={() => setActiveConversation(conversation)}
onClick={() => {
setActiveConversation(conversation);
if (layoutController?.isMobile)
layoutController?.toggleSidebar();
}}
/>
</li>
);
Expand Down

0 comments on commit 485841a

Please sign in to comment.