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
ref={buttonRef}
onClick={() => setIsOpen((prev) => !prev)}
className="outline-none"
className="outline-none flex items-center justify-center"
disabled={disabled}
>
{label}

View File

@ -30,7 +30,7 @@ export const renderEmoji = (
if (typeof emoji === "object")
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}
</span>
);
@ -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;
};