Use recent convos for share via dialog (#4352)
This commit is contained in:
parent
9f001526d3
commit
a49fe13223
3 changed files with 81 additions and 11 deletions
|
@ -26,10 +26,15 @@ import {useAgent, useSession} from '#/state/session'
|
|||
export const RQKEY = ['convo-list']
|
||||
type RQPageParam = string | undefined
|
||||
|
||||
export function useListConvosQuery() {
|
||||
export function useListConvosQuery({
|
||||
enabled,
|
||||
}: {
|
||||
enabled?: boolean
|
||||
} = {}) {
|
||||
const agent = useAgent()
|
||||
|
||||
return useInfiniteQuery({
|
||||
enabled,
|
||||
queryKey: RQKEY,
|
||||
queryFn: async ({pageParam}) => {
|
||||
const {data} = await agent.api.chat.bsky.convo.listConvos(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue