Rough enablement

This commit is contained in:
Eric Bailey
2024-02-13 15:40:32 -06:00
parent 78acf4c86e
commit da735f4894
3 changed files with 79 additions and 28 deletions
+16
View File
@@ -48,3 +48,19 @@ export function useModServiceEnableMutation() {
},
})
}
export function useModServiceLabelGroupEnableMutation() {
const queryClient = useQueryClient()
return useMutation({
async mutationFn({did, group, enabled}: {did: string; group: string, enabled: boolean}) {
console.log('useModServiceLabelGroupEnableMutation', did, group, enabled)
await getAgent().setModServiceLabelGroupEnabled(did, group, enabled)
},
onSuccess() {
queryClient.invalidateQueries({
queryKey: preferencesQueryKey,
})
},
})
}