This commit is contained in:
Ren Amamiya
2023-06-25 20:36:19 +07:00
parent fe25dbaed0
commit 6af0b453e3
25 changed files with 183 additions and 114 deletions
+3 -1
View File
@@ -90,7 +90,9 @@ export function AddImageBlock({ parentState }: { parentState: any }) {
};
const block = useMutation({
mutationFn: (data: any) => createBlock(data.kind, data.title, data.content),
mutationFn: (data: any) => {
return createBlock(data.kind, data.title, data.content);
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["blocks"] });
},