better naming
This commit is contained in:
parent
ebe64b828b
commit
0ff6ee2fc8
2 changed files with 8 additions and 4 deletions
|
@ -29,17 +29,17 @@ export const profilesQueryKey = (handles: string[]) => ['profiles', handles]
|
|||
|
||||
export function useProfileQuery({
|
||||
did,
|
||||
dontInvalidate,
|
||||
staleTime = STALE.SECONDS.FIFTEEN,
|
||||
}: {
|
||||
did: string | undefined
|
||||
dontInvalidate?: boolean
|
||||
staleTime?: number
|
||||
}) {
|
||||
return useQuery({
|
||||
// WARNING
|
||||
// this staleTime is load-bearing
|
||||
// if you remove it, the UI infinite-loops
|
||||
// -prf
|
||||
staleTime: dontInvalidate ? STALE.INFINITY : STALE.SECONDS.FIFTEEN,
|
||||
staleTime,
|
||||
refetchOnWindowFocus: true,
|
||||
queryKey: RQKEY(did || ''),
|
||||
queryFn: async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue