From 20f18717e03347eab6e668105707e291a536d601 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Mon, 8 Jul 2024 20:01:22 +0700 Subject: [PATCH] Fix unnecessary invalidation of super like count --- src/services/datahub/content-staking/utils.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/datahub/content-staking/utils.tsx b/src/services/datahub/content-staking/utils.tsx index 56e807af1..a503f3b1e 100644 --- a/src/services/datahub/content-staking/utils.tsx +++ b/src/services/datahub/content-staking/utils.tsx @@ -12,8 +12,9 @@ export function toastSuperLikeNotification( myAddress: string | undefined ) { const { post, staker } = eventData.entity - getSuperLikeCountQuery.invalidate(queryClient, post.persistentId) if (staker.id === myAddress && post.persistentId) { + getSuperLikeCountQuery.invalidate(queryClient, post.persistentId) + const todayLike = getTodaySuperLikeCountQuery.getQueryData( queryClient, myAddress