[APP-1809] add cleanup button for unavailable moderation services (#9901)

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
Spence Pope
2026-02-20 11:23:01 -05:00
committed by GitHub
parent 3fae42c077
commit 5e0ffc0917
2 changed files with 72 additions and 5 deletions
+16
View File
@@ -82,6 +82,22 @@ export function useLabelersDetailedInfoQuery({dids}: {dids: string[]}) {
})
}
export function useRemoveLabelersMutation() {
const queryClient = useQueryClient()
const agent = useAgent()
return useMutation({
async mutationFn({dids}: {dids: string[]}) {
await Promise.all(dids.map(did => agent.removeLabeler(did)))
},
async onSuccess() {
await queryClient.invalidateQueries({
queryKey: preferencesQueryKey,
})
},
})
}
export function useLabelerSubscriptionMutation() {
const queryClient = useQueryClient()
const agent = useAgent()