GroupListItem: When disabledReason provided, do not call onSelectGroup

This commit is contained in:
Scott Nonnenberg 2024-08-27 00:33:32 +10:00 committed by GitHub
parent 60a4da57d0
commit ed95c8959f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,7 +68,11 @@ export function GroupListItem({
}
title={<UserText text={group.title} />}
subtitle={<UserText text={messageText} />}
onClick={() => onSelectGroup(group.id)}
onClick={() => {
if (!group.disabledReason) {
onSelectGroup(group.id);
}
}}
/>
);
}