Skip to content

Commit

Permalink
Fix unnecessary invalidation of super like count
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jul 8, 2024
1 parent 2106980 commit 20f1871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/datahub/content-staking/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20f1871

Please sign in to comment.