Fix reaction tooltip message

Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
ajbura 2022-02-04 11:39:18 +05:30
parent a59aa2c30f
commit b008c5f07f

View file

@ -304,9 +304,11 @@ function genReactionMsg(userIds, reaction) {
{userIds.map((userId, index) => (
<React.Fragment key={userId}>
{twemojify(getUsername(userId))}
<span style={{ opacity: '.6' }}>
{index === userIds.length - 1 ? ' and ' : ', '}
</span>
{index < userIds.length - 1 && (
<span style={{ opacity: '.6' }}>
{index === userIds.length - 2 ? ' and ' : ', '}
</span>
)}
</React.Fragment>
))}
<span style={{ opacity: '.6' }}>{' reacted with '}</span>