chore: project emoji icon improvement (#3837)

This commit is contained in:
Anmol Singh Bhatia 2024-02-29 15:31:44 +05:30 committed by GitHub
parent 9326fb0762
commit 62693abb09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 12 deletions

View File

@ -53,7 +53,7 @@ const EmojiIconPicker: React.FC<Props> = (props) => {
<Popover.Button <Popover.Button
ref={buttonRef} ref={buttonRef}
onClick={() => setIsOpen((prev) => !prev)} onClick={() => setIsOpen((prev) => !prev)}
className="outline-none" className="outline-none flex items-center justify-center"
disabled={disabled} disabled={disabled}
> >
{label} {label}

View File

@ -30,7 +30,7 @@ export const renderEmoji = (
if (typeof emoji === "object") if (typeof emoji === "object")
return ( return (
<span style={{ color: emoji.color }} className="material-symbols-rounded !text-sm"> <span style={{ fontSize: "16px", color: emoji.color }} className="material-symbols-rounded">
{emoji.name} {emoji.name}
</span> </span>
); );
@ -41,16 +41,13 @@ export const groupReactions: (reactions: any[], key: string) => { [key: string]:
reactions: any, reactions: any,
key: string key: string
) => { ) => {
const groupedReactions = reactions.reduce( const groupedReactions = reactions.reduce((acc: any, reaction: any) => {
(acc: any, reaction: any) => { if (!acc[reaction[key]]) {
if (!acc[reaction[key]]) { acc[reaction[key]] = [];
acc[reaction[key]] = []; }
} acc[reaction[key]].push(reaction);
acc[reaction[key]].push(reaction); return acc;
return acc; }, {} as { [key: string]: any[] });
},
{} as { [key: string]: any[] }
);
return groupedReactions; return groupedReactions;
}; };