adjustments

This commit is contained in:
Hailey
2024-02-07 22:35:06 -08:00
parent 11b949ffc9
commit 95207bad9d
3 changed files with 1 additions and 18 deletions
-14
View File
@@ -29,20 +29,6 @@ export const profileBasicKey = (did: string) => ['profileBasic', did]
export const profilesQueryKey = (handles: string[]) => ['profiles', handles]
export function useProfileQuery({did}: {did: string | undefined}) {
// return useQuery({
// // WARNING
// // this staleTime is load-bearing
// // if you remove it, the UI infinite-loops
// // -prf
// staleTime,
// refetchOnWindowFocus: true,
// queryKey: RQKEY(did || ''),
// queryFn: async () => {
// const res = await getAgent().getProfile({actor: did || ''})
// return res.data
// },
// enabled: !!did,
// })
const queryClient = useQueryClient()
// TODO Figure out a good staleTime for this. We should refetch on every profile push, because we need to check for
// blocks
+1 -2
View File
@@ -130,8 +130,7 @@ export function precacheFeedPosts(
handleEmbed(post.post.embed)
// Cache parent author and embeds
if (AppBskyActorDefs.isProfileViewBasic(post.reply?.parent.author)) {
console.log(post.reply?.parent.author)
if (post.reply?.parent.author) {
precacheProfile(
queryClient,
post.reply.parent.author as AppBskyActorDefs.ProfileViewBasic,
-2
View File
@@ -9,7 +9,6 @@ import {sanitizeDisplayName} from 'lib/strings/display-names'
import {sanitizeHandle} from 'lib/strings/handles'
import {makeProfileLink} from 'lib/routes/links'
import {useProfileQuery} from '#/state/queries/profile'
import {STALE} from '#/state/queries'
export function UserInfoText({
type = 'md',
@@ -32,7 +31,6 @@ export function UserInfoText({
const {data: profile, isError} = useProfileQuery({
did,
staleTime: STALE.INFINITY,
})
let inner