seller list + view contract and confrim + approve register

This commit is contained in:
hamid zarghami
2025-10-11 12:20:10 +03:30
parent 26f1a057be
commit 3fb0a15f3d
12 changed files with 466 additions and 29 deletions
+21
View File
@@ -0,0 +1,21 @@
import * as api from "../service/SellerService";
import { useMutation, useQuery } from "@tanstack/react-query";
export const useGetSellers = (page: number = 1) => {
return useQuery({
queryKey: ["sellers", page],
queryFn: () => api.getSellers(page),
});
};
export const useToggleSellerStatus = () => {
return useMutation({
mutationFn: api.toggleSellerStatus,
});
};
export const useApproveContract = () => {
return useMutation({
mutationFn: api.approveContract,
});
};