You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

useFetchProductData.js 278B

123456789
  1. import { useQuery } from '@tanstack/react-query';
  2. import { getProductData } from '../requests/products/producDataRequest';
  3. export const useFetchSingleProduct = (customID) => {
  4. return useQuery(
  5. ['product', customID],
  6. async () => await getProductData(customID)
  7. );
  8. };