import { useQuery } from 'react-query';
import useAxios from './useAxios';

export default function useGetQueryP(KEY: string | string[], Api: string, options: any = {}) {
  const axios = useAxios();
  const pagination = options;
  
  return useQuery(
    [ KEY], async () => {
    const response = await axios.get(Api + pagination );
    return response.data; 
  },
  {
    onError: (error:any) => {

    },


  }
  );
}

