interface FishProps {
imgName: string;
random: number;
}
const Fish: React.FC<FishProps> = (props) => {
...
const fetchPartners = async (params) => {
const id = params.queryKey[1]
const { data } = await axios.get(`/api/v1/shop/partner/${id}`)
return data
}
...
const {data: fetchPartners, isLoading} = useQuery(['partner', id], fetchPartners)