courrier formatting
This commit is contained in:
parent
fcf1631e0f
commit
9dc4ef2fac
@ -120,6 +120,16 @@ export default function EmailListItem({
|
||||
: 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 (
|
||||
<div
|
||||
className={cn(
|
||||
@ -127,10 +137,10 @@ export default function EmailListItem({
|
||||
isActive ? 'bg-blue-50/50' : '',
|
||||
!email.flags?.seen ? 'bg-blue-50/20' : ''
|
||||
)}
|
||||
onClick={onSelect}
|
||||
onClick={handleEmailSelect}
|
||||
>
|
||||
<div
|
||||
className="flex-shrink-0 pr-2"
|
||||
className="flex-shrink-0 pr-2 checkbox-area"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user