UNPKG

@shopify/shop-minis-react

Version:

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

25 lines (24 loc) 559 B
import { useMemo as i } from "react"; import { useShopActions as m } from "../../internal/useShopActions.js"; import { useShopActionsDataFetching as p } from "../../internal/useShopActionsDataFetching.js"; const h = (t) => { const { getProduct: r } = m(), { id: s, skip: e = !1, ...c } = t, { data: o, ...u } = p( r, { id: s, ...c }, { skip: e, hook: "useProduct" } ), n = i(() => o ?? null, [o]); return { ...u, product: n }; }; export { h as useProduct }; //# sourceMappingURL=useProduct.js.map