Add modservice screen and profile-header-card

This commit is contained in:
Paul Frazee
2024-01-11 20:26:50 -08:00
parent f0a35a940b
commit 81820479f3
14 changed files with 972 additions and 0 deletions
+14
View File
@@ -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
},
})
}
+2
View File
@@ -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 {