From d08a7cb20e0733c049a51bb3063f657615022275 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Thu, 29 Feb 2024 15:14:26 +0530 Subject: [PATCH] chore: project emoji icon improvement --- web/components/emoji-icon-picker/index.tsx | 2 +- web/helpers/emoji.helper.tsx | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/web/components/emoji-icon-picker/index.tsx b/web/components/emoji-icon-picker/index.tsx index 0c72b986a11..57d5d889672 100644 --- a/web/components/emoji-icon-picker/index.tsx +++ b/web/components/emoji-icon-picker/index.tsx @@ -53,7 +53,7 @@ const EmojiIconPicker: React.FC = (props) => { setIsOpen((prev) => !prev)} - className="outline-none" + className="outline-none flex items-center justify-center" disabled={disabled} > {label} diff --git a/web/helpers/emoji.helper.tsx b/web/helpers/emoji.helper.tsx index 026211634ed..5ff95027b52 100644 --- a/web/helpers/emoji.helper.tsx +++ b/web/helpers/emoji.helper.tsx @@ -30,7 +30,7 @@ export const renderEmoji = ( if (typeof emoji === "object") return ( - + {emoji.name} ); @@ -41,16 +41,13 @@ export const groupReactions: (reactions: any[], key: string) => { [key: string]: reactions: any, key: string ) => { - const groupedReactions = reactions.reduce( - (acc: any, reaction: any) => { - if (!acc[reaction[key]]) { - acc[reaction[key]] = []; - } - acc[reaction[key]].push(reaction); - return acc; - }, - {} as { [key: string]: any[] } - ); + const groupedReactions = reactions.reduce((acc: any, reaction: any) => { + if (!acc[reaction[key]]) { + acc[reaction[key]] = []; + } + acc[reaction[key]].push(reaction); + return acc; + }, {} as { [key: string]: any[] }); return groupedReactions; };