Skip to content

Commit

Permalink
Remove invalidation for my super like check after like because someti…
Browse files Browse the repository at this point in the history
…mes the data is delayed
  • Loading branch information
teodorus-nathaniel committed Jul 5, 2024
1 parent 8a141d6 commit b5ea61f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/services/datahub/content-staking/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { QueryClient } from '@tanstack/react-query'
import { ReactNode } from 'react'
import { toast } from 'sonner'
import { SubscribeSuperLikeSubscription } from '../generated-query'
import {
getAddressLikeCountToPostQuery,
getSuperLikeCountQuery,
getTodaySuperLikeCountQuery,
} from './query'
import { getSuperLikeCountQuery, getTodaySuperLikeCountQuery } from './query'

export function toastSuperLikeNotification(
queryClient: QueryClient,
Expand All @@ -18,10 +14,6 @@ export function toastSuperLikeNotification(
const { post, staker } = eventData.entity
getSuperLikeCountQuery.invalidate(queryClient, post.persistentId)
if (staker.id === myAddress && post.persistentId) {
getAddressLikeCountToPostQuery.invalidate(queryClient, {
address: myAddress,
postId: post.persistentId,
})
const todayLike = getTodaySuperLikeCountQuery.getQueryData(
queryClient,
myAddress
Expand Down

0 comments on commit b5ea61f

Please sign in to comment.