{
if (e.key === 'Escape' && !isMentionPickerOpen()) pendingComment.set(editor, null)
}}
>
{canComment ? (
{
setText(value)
saveCommentDraft(NEW_COMMENT_DRAFT, value)
}}
onSubmit={submit}
// No user, no author for the record — dead send button.
disabled={isCommentEmpty(text) || !currentUserId}
getMentionSuggestions={getMentionSuggestions}
renderMentionSuggestion={renderMentionSuggestion}
autoFocus
leading={draftAvatar}
/>
) : (
ComposerFallback &&
)}
)
}