Virtualise labeler list (#8566)

* use flatlist for labeler list

* use key extractor

* dedupe `labelValues`

* add comment
This commit is contained in:
Samuel Newman
2025-06-26 09:39:34 +03:00
committed by GitHub
parent 954e7d2a89
commit e5f9377a69
2 changed files with 178 additions and 169 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import {AppBskyLabelerDefs} from '@atproto/api'
import {type AppBskyLabelerDefs} from '@atproto/api'
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
import {z} from 'zod'
@@ -41,7 +41,7 @@ export function useLabelerInfoQuery({
queryKey: labelerInfoQueryKey(did as string),
queryFn: async () => {
const res = await agent.app.bsky.labeler.getServices({
dids: [did as string],
dids: [did!],
detailed: true,
})
return res.data.views[0] as AppBskyLabelerDefs.LabelerViewDetailed