Skip to content

Commit

Permalink
Fix tasks error query
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Jul 5, 2024
1 parent baa6ad5 commit eb5c568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/datahub/tasks/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getGamificationTasksQuery = createQuery({
export const getGamificationTasksErrorQuery = createQuery({
key: 'gamificationTasksError',
fetcher: async (error: string) => {
if (error === 'error') return undefined
if (error === 'error') return null

return error
},
Expand All @@ -23,5 +23,5 @@ export const getGamificationTasksErrorQuery = createQuery({
})

export const clearGamificationTasksError = (client: QueryClient) => {
getGamificationTasksErrorQuery.setQueryData(client, 'error', () => undefined)
getGamificationTasksErrorQuery.setQueryData(client, 'error', () => null)
}

0 comments on commit eb5c568

Please sign in to comment.