Follow conventions for query, use isDirty flag in session store to avoid unneccessary writes

This commit is contained in:
Eric Bailey 2023-11-10 08:46:45 -06:00
parent 742f53d1ec
commit b0c9cce5c3
7 changed files with 24 additions and 16 deletions

View file

@ -1,13 +0,0 @@
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
},
})
}