Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/hooks/use-dashboard-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function useUserOnboardingData(address: string | undefined) {
staleTime: DASHBOARD_CACHE_STALE_TIME,
gcTime: DASHBOARD_CACHE_GC_TIME,
refetchOnWindowFocus: false,
refetchOnMount: false,
})
}

Expand All @@ -80,6 +81,7 @@ export function useUserAnalyticsData(address: string | undefined) {
staleTime: DASHBOARD_CACHE_STALE_TIME,
gcTime: DASHBOARD_CACHE_GC_TIME,
refetchOnWindowFocus: false,
refetchOnMount: false,
})
}

Expand Down
4 changes: 1 addition & 3 deletions src/hooks/use-user-onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ export function useUserOnboarding(
if (response.ok) {
const data = await response.json()
setUserOnboarding(data.user)
// Update React Query cache
// Update React Query cache (no invalidation — avoids redundant GET)
queryClient.setQueryData(["userOnboarding", address], data)
// Invalidate to trigger refetch if needed
queryClient.invalidateQueries({ queryKey: ["userOnboarding", address] })
return true
} else {
const error = await response.json()
Expand Down