possible fix for delete button

main
Cogent Apps 2023-03-20 14:18:25 +00:00
parent da0d4844f1
commit f0b22eff64
1 changed files with 7 additions and 1 deletions

View File

@ -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());
}