Refactor ChangeHandle modal (#1929)
* Refactor ChangeHandle to use new methods * Better telemetry * Remove unused logic * Remove caching * Add error message * Persist service changes, don't fall back on change handle
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {useSession} from '#/state/session'
|
||||
|
||||
export const RQKEY = (serviceUrl: string) => ['service', serviceUrl]
|
||||
|
||||
export function useServiceQuery() {
|
||||
const {agent} = useSession()
|
||||
return useQuery({
|
||||
queryKey: RQKEY(agent.service.toString()),
|
||||
queryFn: async () => {
|
||||
const res = await agent.com.atproto.server.describeServer()
|
||||
return res.data
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user