chore: tweak memo view

This commit is contained in:
Steven
2024-02-08 22:52:49 +08:00
parent 4081a6f5ad
commit 60efd3ac32
7 changed files with 153 additions and 211 deletions

View File

@ -33,12 +33,12 @@ const MemoReactionListView = (props: Props) => {
}, [reactions]);
return (
(currentUser || reactionGroup.size > 0) && (
reactions.length > 0 && (
<div className="w-full mt-2 flex flex-row justify-start items-start flex-wrap gap-1 select-none">
{currentUser && <ReactionSelector memo={memo} />}
{Array.from(reactionGroup).map(([reactionType, users]) => {
return <ReactionView key={`${reactionType.toString()} ${users.length}`} memo={memo} reactionType={reactionType} users={users} />;
})}
{currentUser && <ReactionSelector memo={memo} />}
</div>
)
);