Skip to content

Commit

Permalink
Fix wrong proptypes (#924)
Browse files Browse the repository at this point in the history
* fix wrong proptypes

* Update packages/template-retail-react-app/app/components/recommended-products/index.jsx

Co-authored-by: Vincent Marta <[email protected]>

Co-authored-by: Brian Feister <[email protected]>
Co-authored-by: Vincent Marta <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2023
1 parent aea0894 commit 34608a0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ RecommendedProducts.propTypes = {
/* The recommender to request */
recommender: PropTypes.string,

/* The product IDs to use for recommendation context */
products: PropTypes.arrayOf(PropTypes.string),
/* The products to use for recommendation context */
products: PropTypes.arrayOf(PropTypes.object),

/* Callback to determine if the component should fetch results */
shouldFetch: PropTypes.func
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const AddToCartModal = () => {
/>
}
recommender={'pdp-similar-items'}
products={product}
products={[product]}
mx={{base: -4, md: -8, lg: 0}}
shouldFetch={() => product?.id}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const Cart = () => {
/>
}
recommender={'product-to-product-einstein'}
products={basket?.productItems?.map((item) => item.productId)}
products={basket?.productItems?.map((item) => item)}
shouldFetch={() =>
basket?.basketId && basket.productItems?.length > 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const ProductDetail = ({category, product, isLoading}) => {
/>
}
recommender={'complete-the-set'}
products={product}
products={[product]}
mx={{base: -4, md: -8, lg: 0}}
shouldFetch={() => product?.id}
/>
Expand All @@ -278,7 +278,7 @@ const ProductDetail = ({category, product, isLoading}) => {
/>
}
recommender={'pdp-similar-items'}
products={product}
products={[product]}
mx={{base: -4, md: -8, lg: 0}}
shouldFetch={() => product?.id}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ ProductList.propTypes = {
searchQuery: PropTypes.string,
onAddToWishlistClick: PropTypes.func,
onRemoveWishlistClick: PropTypes.func,
category: PropTypes.string
category: PropTypes.object
}

export default ProductList
Expand Down

0 comments on commit 34608a0

Please sign in to comment.