tangled
alpha
login
or
join now
jeanmachine.dev
/
witchsky.app
forked from
jollywhoppers.com/witchsky.app
0
fork
atom
Bluesky app fork with some witchin' additions 💫
0
fork
atom
overview
issues
pulls
pipelines
Use Tanstack Query status over isPending
DS Boyce
1 month ago
54598571
e2058c8e
+3
-3
1 changed file
expand all
collapse all
unified
split
src
view
screens
Profile.tsx
+3
-3
src/view/screens/Profile.tsx
···
79
data: resolvedDid,
80
error: resolveError,
81
refetch: refetchDid,
82
-
isLoading: isLoadingDid,
83
} = useResolveDidQuery(name)
84
const {
85
data: profile,
86
error: profileError,
87
refetch: refetchProfile,
88
-
isLoading: isLoadingProfile,
89
isPlaceholderData: isPlaceholderProfile,
0
90
} = useProfileQuery({
91
did: resolvedDid,
92
})
···
117
}, [queryClient, profile?.viewer?.blockedBy, resolvedDid])
118
119
// Most pushes will happen here, since we will have only placeholder data
120
-
if (isLoadingDid || isLoadingProfile) {
121
return (
122
<Layout.Content>
123
<ProfileHeaderLoading />
···
79
data: resolvedDid,
80
error: resolveError,
81
refetch: refetchDid,
82
+
status: didStatus,
83
} = useResolveDidQuery(name)
84
const {
85
data: profile,
86
error: profileError,
87
refetch: refetchProfile,
0
88
isPlaceholderData: isPlaceholderProfile,
89
+
status: profileStatus,
90
} = useProfileQuery({
91
did: resolvedDid,
92
})
···
117
}, [queryClient, profile?.viewer?.blockedBy, resolvedDid])
118
119
// Most pushes will happen here, since we will have only placeholder data
120
+
if (didStatus === 'pending' || profileStatus === 'pending') {
121
return (
122
<Layout.Content>
123
<ProfileHeaderLoading />