Add modservice screen and profile-header-card
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import {useQuery} from '@tanstack/react-query'
|
||||
import {getAgent} from '../session'
|
||||
|
||||
export const RQKEY = (did: string) => ['mod-service-info', did]
|
||||
|
||||
export function useModServiceInfoQuery({did}: {did: string}) {
|
||||
return useQuery({
|
||||
queryKey: RQKEY(did),
|
||||
queryFn: async () => {
|
||||
const res = await getAgent().app.bsky.moderation.getService({did})
|
||||
return res.data
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -312,6 +312,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
)
|
||||
|
||||
__globalAgent = agent
|
||||
window.agent = agent
|
||||
queryClient.clear()
|
||||
upsertAccount(account)
|
||||
|
||||
@@ -351,6 +352,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
{networkErrorCallback: clearCurrentAccount},
|
||||
),
|
||||
})
|
||||
window.agent = agent
|
||||
|
||||
let canReusePrevSession = false
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user