Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add sort to searchPosts request (#3581)

authored by

Samuel Newman and committed by
GitHub
2974b407 45e572b2

+7 -12
+7 -12
src/state/queries/search-posts.ts
··· 34 34 >({ 35 35 queryKey: searchPostsQueryKey({query, sort}), 36 36 queryFn: async ({pageParam}) => { 37 - // waiting on new APIs 38 - switch (sort) { 39 - // case 'top': 40 - // case 'latest': 41 - default: 42 - const res = await getAgent().app.bsky.feed.searchPosts({ 43 - q: query, 44 - limit: 25, 45 - cursor: pageParam, 46 - }) 47 - return res.data 48 - } 37 + const res = await getAgent().app.bsky.feed.searchPosts({ 38 + q: query, 39 + limit: 25, 40 + cursor: pageParam, 41 + sort, 42 + }) 43 + return res.data 49 44 }, 50 45 initialPageParam: undefined, 51 46 getNextPageParam: lastPage => lastPage.cursor,