seller list + view contract and confrim + approve register
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user