enforce the order of reactions

This commit is contained in:
Pavel Prichodko 2022-06-14 18:59:36 +02:00
parent 06c56c62ef
commit ca5bd55129
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
1 changed files with 4 additions and 4 deletions

View File

@ -48,13 +48,13 @@ export const ReactionPopover = (props: Props) => {
{children}
<Popover side="top" align="center" sideOffset={6}>
<Flex gap={1} css={{ padding: 8 }}>
{Object.entries(reactions).map(([reaction, value]) => {
const emoji = emojis[reaction as Reaction]
{Object.entries(emojis).map(([type, emoji]) => {
const reaction = reactions[type]
return (
<Button
key={reaction}
key={type}
onClick={() => onClick(reaction as Reaction)}
active={value.me}
active={reaction.me}
aria-label={`React with ${emoji.symbol}`}
>
<Image width={30} src={emoji.url} alt={emoji.symbol} />