Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-602] chore: project emoji icon improvement #3837

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/components/emoji-icon-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
19 changes: 8 additions & 11 deletions web/helpers/emoji.helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
Expand All @@ -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;
};
Loading