create category

This commit is contained in:
hamid zarghami
2026-01-24 11:08:39 +03:30
parent 6948af8b05
commit 13db24d13b
10 changed files with 203 additions and 5 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
import { useQuery } from "@tanstack/react-query";
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/ProductService";
export const useGetCategory = () => {
@@ -7,3 +7,9 @@ export const useGetCategory = () => {
queryFn: api.getCategory,
});
};
export const useCreateCategory = () => {
return useMutation({
mutationFn: api.createCategory,
});
};