chore: optimize unreact network requests (#5747)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
google-labs-jules[bot] 2026-03-20 18:08:28 +08:00 committed by GitHub
parent a7cabb7ce6
commit 23a7e99a21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -48,9 +48,7 @@ export const useReactionActions = ({ memo, onComplete }: UseReactionActionsOptio
const reactions = memo.reactions.filter(
(reaction) => reaction.reactionType === reactionType && reaction.creator === currentUser.name,
);
for (const reaction of reactions) {
await memoServiceClient.deleteMemoReaction({ name: reaction.name });
}
await Promise.all(reactions.map((reaction) => memoServiceClient.deleteMemoReaction({ name: reaction.name })));
} else {
await memoServiceClient.upsertMemoReaction({
name: memo.name,