import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/DmailService";

export const useGetDomains = () => {
  return useQuery({
    queryKey: ["dmail-domains"],
    queryFn: api.getDomains,
  });
};

export const useActiveDomain = () => {
  return useMutation({
    mutationFn: api.activeDomain,
  });
};
