UNPKG

@shopify/shop-minis-react

Version:

React component library for Shopify Shop Minis with Tailwind CSS v4 support (source-only, requires TypeScript)

30 lines (29 loc) 775 B
import { useCallback as e } from "react"; import { useShopActions as a } from "../../internal/useShopActions.js"; import { useShopActionsPaginatedDataFetching as d } from "../../internal/useShopActionsPaginatedDataFetching.js"; import { MiniEntityNotFoundError as m } from "../../utils/errors.js"; const l = (t) => { const { getProductList: o } = a(), { skip: s, ...r } = t ?? {}, i = e((u) => { if (u === null) throw new m({ hook: "useProductList", message: "Product list not found" }); }, []), { data: n, ...c } = d( o, r, { skip: s, hook: "useProductList", validator: i } ); return { ...c, productList: n }; }; export { l as useProductList }; //# sourceMappingURL=useProductList.js.map