import { API_ENDPOINTS, profileService } from "@/lib/api";
import { useQuery } from "@tanstack/react-query";
import { useMemo } from "react";

export const useProfileQuery = () => {
  const queryKey = useMemo(
    () => [API_ENDPOINTS.PROFILE.READ, "CURRENT_USER_PROFILE"],
    [],
  );
  return useQuery({
    queryKey,
    queryFn: () => profileService.getProfile(),
  });
};
