courrier formatting

This commit is contained in:
alma 2025-04-30 16:14:33 +02:00
parent fcf1631e0f
commit 9dc4ef2fac

View File

@ -120,6 +120,16 @@ export default function EmailListItem({
: text; : text;
}; };
// Handle email selection without affecting checkbox
const handleEmailSelect = (e: React.MouseEvent) => {
// Make sure we're not clicking on or near the checkbox
const target = e.target as HTMLElement;
const checkboxArea = target.closest('.checkbox-area');
if (!checkboxArea) {
onSelect();
}
};
return ( return (
<div <div
className={cn( className={cn(
@ -127,10 +137,10 @@ export default function EmailListItem({
isActive ? 'bg-blue-50/50' : '', isActive ? 'bg-blue-50/50' : '',
!email.flags?.seen ? 'bg-blue-50/20' : '' !email.flags?.seen ? 'bg-blue-50/20' : ''
)} )}
onClick={onSelect} onClick={handleEmailSelect}
> >
<div <div
className="flex-shrink-0 pr-2" className="flex-shrink-0 pr-2 checkbox-area"
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
}} }}