Skip to content

Commit

Permalink
possible fix for delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
cogentapps committed Mar 20, 2023
1 parent da0d484 commit f0b22ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/components/sidebar/recent-chats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ export default function RecentChats(props: any) {
const currentChatID = context.currentChat.chat?.id;
const recentChats = context.chat.search.query('');

const onClick = useCallback(() => {
const onClick = useCallback((e: React.MouseEvent) => {
if (e.currentTarget.closest('button')) {
e.preventDefault();
e.stopPropagation();
return;
}

if (window.matchMedia('(max-width: 40em)').matches) {
dispatch(toggleSidebar());
}
Expand Down

0 comments on commit f0b22ef

Please sign in to comment.