enforce the order of reactions
This commit is contained in:
parent
7a6dea00ff
commit
38fabb3e18
|
@ -48,13 +48,13 @@ export const ReactionPopover = (props: Props) => {
|
||||||
{children}
|
{children}
|
||||||
<Popover side="top" align="center" sideOffset={6}>
|
<Popover side="top" align="center" sideOffset={6}>
|
||||||
<Flex gap={1} css={{ padding: 8 }}>
|
<Flex gap={1} css={{ padding: 8 }}>
|
||||||
{Object.entries(reactions).map(([reaction, value]) => {
|
{Object.entries(emojis).map(([type, emoji]) => {
|
||||||
const emoji = emojis[reaction as Reaction]
|
const reaction = reactions[type]
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
key={reaction}
|
key={type}
|
||||||
onClick={() => onClick(reaction as Reaction)}
|
onClick={() => onClick(reaction as Reaction)}
|
||||||
active={value.me}
|
active={reaction.me}
|
||||||
aria-label={`React with ${emoji.symbol}`}
|
aria-label={`React with ${emoji.symbol}`}
|
||||||
>
|
>
|
||||||
<Image width={30} src={emoji.url} alt={emoji.symbol} />
|
<Image width={30} src={emoji.url} alt={emoji.symbol} />
|
||||||
|
|
Loading…
Reference in New Issue