import { useMutation } from "react-query"; import type { MutationOptions } from "@/@types/types/query.types"; import { useHttp } from "@/hooks/useHttp"; interface IForgotPasswordBody { Email: string; } export const useForgotPassword = (options?: MutationOptions) => { const http = useHttp("wl-auth-api"); const service = (variable: IForgotPasswordBody) => http.post("/api/clientaccount/forgetpassword", variable); return useMutation({ mutationFn: service, mutationKey: "forget-password", ...options, }); };