adjust feeds limit

This commit is contained in:
Hailey
2024-06-09 23:28:46 -07:00
parent 17c365a560
commit d2bdcc4c99
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -25,7 +25,9 @@ export function StepFeeds() {
const [state, dispatch] = useWizardState()
const [query, setQuery] = useState('')
const {data: popularFeedsPages, fetchNextPage} = useGetPopularFeedsQuery()
const {data: popularFeedsPages, fetchNextPage} = useGetPopularFeedsQuery({
limit: 30,
})
const popularFeeds =
popularFeedsPages?.pages.flatMap(page => page.feeds) || []
+2 -2
View File
@@ -173,7 +173,7 @@ export function useFeedSourceInfoQuery({uri}: {uri: string}) {
export const useGetPopularFeedsQueryKey = ['getPopularFeeds']
export function useGetPopularFeedsQuery() {
export function useGetPopularFeedsQuery({limit = 10}: {limit?: number}) {
const agent = useAgent()
return useInfiniteQuery<
AppBskyUnspeccedGetPopularFeedGenerators.OutputSchema,
@@ -185,7 +185,7 @@ export function useGetPopularFeedsQuery() {
queryKey: useGetPopularFeedsQueryKey,
queryFn: async ({pageParam}) => {
const res = await agent.app.bsky.unspecced.getPopularFeedGenerators({
limit: 10,
limit,
cursor: pageParam,
})
return res.data