Cleanup
This commit is contained in:
@@ -29,14 +29,7 @@ export function useProfileListsQuery(did: string, opts?: {enabled?: boolean}) {
|
|||||||
cursor: pageParam,
|
cursor: pageParam,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Starter packs use a reference list, which we do not want to show on profiles. At some point we could probably
|
return res.data
|
||||||
// just filter this out on the backend instead of in the client.
|
|
||||||
return {
|
|
||||||
...res.data,
|
|
||||||
lists: res.data.lists.filter(
|
|
||||||
l => l.purpose !== 'app.bsky.graph.defs#referencelist',
|
|
||||||
),
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
initialPageParam: undefined,
|
initialPageParam: undefined,
|
||||||
getNextPageParam: lastPage => lastPage.cursor,
|
getNextPageParam: lastPage => lastPage.cursor,
|
||||||
@@ -47,7 +40,15 @@ export function useProfileListsQuery(did: string, opts?: {enabled?: boolean}) {
|
|||||||
pages: data.pages.map(page => {
|
pages: data.pages.map(page => {
|
||||||
return {
|
return {
|
||||||
...page,
|
...page,
|
||||||
lists: page.lists.filter(list => {
|
lists: page.lists
|
||||||
|
/*
|
||||||
|
* Starter packs use a reference list, which we do not want to
|
||||||
|
* show on profiles. At some point we could probably just filter
|
||||||
|
* this out on the backend instead of in the client.
|
||||||
|
*/
|
||||||
|
.filter(l => l.purpose !== 'app.bsky.graph.defs#referencelist')
|
||||||
|
// filter by labels
|
||||||
|
.filter(list => {
|
||||||
const decision = moderateUserList(list, moderationOpts!)
|
const decision = moderateUserList(list, moderationOpts!)
|
||||||
return !decision.ui('contentList').filter
|
return !decision.ui('contentList').filter
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user