enforce the order of reactions

This commit is contained in:
Pavel Prichodko 2022-06-14 18:59:36 +02:00
parent 7a6dea00ff
commit 38fabb3e18
No known key found for this signature in database
GPG Key ID: 8E4C82D464215E83
1 changed files with 4 additions and 4 deletions

View File

@ -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} />