fix mutationFn

This commit is contained in:
Samuel Newman
2026-02-11 13:02:18 +02:00
parent e311d679e0
commit 5010d87575
@@ -99,7 +99,7 @@ function GermSelfButton({did}: {did: string}) {
const queryClient = useQueryClient()
const {mutate: deleteDeclaration, isPending} = useMutation({
onMutate: async () => {
mutationFn: async () => {
const previousRecord = await agent.com.germnetwork.declaration
.get({
repo: did,
@@ -117,7 +117,7 @@ function GermSelfButton({did}: {did: string}) {
return previousRecord
},
onSuccess: (_data, _variables, previousRecord) => {
onSuccess: previousRecord => {
async function undo() {
if (!previousRecord) return
await agent.com.germnetwork.declaration.put(