From 691f90f81b95812d964549f2f4667d9078518abe 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 7d2bb41..6a7fe20 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