WIP kill me

This commit is contained in:
Eric Bailey
2025-05-23 16:35:22 -05:00
parent 9e9ab55027
commit da4afb78d0
8 changed files with 147 additions and 43 deletions
+4 -2
View File
@@ -41,11 +41,12 @@ export function usePostThread({
const query = useQuery({
enabled,
queryKey,
gcTime: 0,
async queryFn() {
const {data} = await agent.app.bsky.unspecced.getPostThreadV2({
anchor: uri!,
branchingFactor: params.view === 'linear' ? 1 : 100,
below: 10,
branchingFactor: params.view === 'linear' ? 1 : 3, // 100 TODO
below: 3,
sorting: mapSortOptionsToSortID(params.sort),
})
return data
@@ -95,6 +96,7 @@ export function usePostThread({
return {
...query,
data: {
anchorIndex: items.findIndex(i => Boolean(i.ui?.isAnchor)),
items,
threadgate: query.data?.threadgate,
},