useProductSearch
Category:
Navigation & Routing
Composable for product search.
Types
ts
export function useProductSearch(): UseProductSearchReturn
ts
export type UseProductSearchReturn = {
/**
* Searches for a product by its id
* @param productId
* @param options - optional parameters accepts `withCmsAssociations` flag to fetch cms-related associations and criteria
* @returns {Promise<Schemas['ProductDetailResponse']>}
*/
search: (
productId: string,
options?: UseProductSearchReturnOptions,
) => Promise<Schemas["ProductDetailResponse"]>;
};