blob: 5e0ab907d45c61861be7a5571531667108b0969e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import {useQuery} from '@tanstack/react-query'
import {PUBLIC_BSKY_AGENT} from '#/data'
export function useGetProfile({did}: {did: string}) {
return useQuery({
queryKey: ['getProfile', did],
queryFn: async () => {
const res = await PUBLIC_BSKY_AGENT.getProfile({actor: did})
return res.data
},
})
}
|