From 591a9c61bd2fc3d5d44727029772785a9e25d5f2 Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Tue, 7 Feb 2023 12:10:28 +0100 Subject: [PATCH] remove `useMemo` from `hasReactions` (#338) --- .../src/routes/chat/components/chat-message/reactions.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/status-react/src/routes/chat/components/chat-message/reactions.tsx b/packages/status-react/src/routes/chat/components/chat-message/reactions.tsx index 7d2bb41a..6a7fe204 100644 --- a/packages/status-react/src/routes/chat/components/chat-message/reactions.tsx +++ b/packages/status-react/src/routes/chat/components/chat-message/reactions.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react' +import React, { useState } from 'react' import { emojis, @@ -23,9 +23,9 @@ export const MessageReactions = (props: Props) => { const [open, setOpen] = useState(false) - const hasReaction = useMemo(() => { - return Object.values(reactions).some(value => value.size > 0) - }, [reactions]) + const hasReaction = Object.values>(reactions).some( + value => value.size > 0 + ) if (hasReaction === false) { return null