From 7794dd8d64787a63267da2aa763b7f268b0e38dc Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:11:04 +0200 Subject: [PATCH] feat: close reactions popover on click --- .../src/components/reaction-popover/index.tsx | 6 ++-- .../components/chat-message/reactions.tsx | 28 +++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/status-react/src/components/reaction-popover/index.tsx b/packages/status-react/src/components/reaction-popover/index.tsx index 692ad8f5..dd782187 100644 --- a/packages/status-react/src/components/reaction-popover/index.tsx +++ b/packages/status-react/src/components/reaction-popover/index.tsx @@ -4,7 +4,7 @@ import { useAccount } from '~/src/protocol' import { styled } from '~/src/styles/config' import { Flex, Image, Popover, PopoverTrigger } from '~/src/system' -import type { Reaction, Reactions } from '~/src/protocol/use-messages' +import type { Reaction, Reactions } from '~/src/protocol' interface Props { children: React.ReactElement @@ -52,13 +52,13 @@ export const ReactionPopover = (props: Props) => { {Object.entries(emojis).map(([type, emoji]) => { - const value = reactions[type] + const value = reactions[type as Reaction] const me = account ? value.has('0x' + account.publicKey) : false return (