import { getSingleUser, logoutUser, updateUser } from "@/service/apis/users";
import {useMutation, useQuery} from "@tanstack/react-query";

export const useGetSingleUser = (id: string) =>
  useQuery({
    queryKey: ["get-single-user", id],
    queryFn: () => getSingleUser(id),
    retry: false,
    refetchOnWindowFocus: false,
  });
export const useUpdateUser = () => useMutation({mutationFn: updateUser});
export const useLogoutUser = () => useMutation({mutationFn:logoutUser})