Skip to content

Commit

Permalink
Merge pull request #18706 from ramonlsouza/issue-18696
Browse files Browse the repository at this point in the history
fix: Raised hand button incorrect state
  • Loading branch information
ramonlsouza committed Sep 7, 2023
2 parents ff1bf8a + ae159e8 commit e4807fd
Showing 1 changed file with 11 additions and 2 deletions.
Expand Up @@ -123,9 +123,18 @@ const ReactionsButton = (props) => {
customStyles: {...actionCustomStyles, width: 'auto'},
});

const icon = currentUserReaction === 'none' ? 'hand' : null;
const icon = !raiseHand && currentUserReaction === 'none' ? 'hand' : null;
const currentUserReactionEmoji = reactions.find(({ native }) => native === currentUserReaction);
const customIcon = !icon ? <Emoji key={currentUserReactionEmoji?.id} emoji={{ id: currentUserReactionEmoji?.id }} {...emojiProps} /> : null;

let customIcon = null;

if (raiseHand) {
customIcon = <Emoji key="hand" emoji={{ id: 'hand' }} {...emojiProps} />;
} else {
if (!icon) {
customIcon = <Emoji key={currentUserReactionEmoji?.id} emoji={{ id: currentUserReactionEmoji?.id }} {...emojiProps} />;
}
}

return (
<BBBMenu
Expand Down

0 comments on commit e4807fd

Please sign in to comment.