Skip to content

Commit

Permalink
Add informative comment to ProductSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
victorhmp committed Feb 4, 2020
1 parent bebd793 commit eb21903
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion react/components/ProductSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ const ProductSummaryCustom = ({
const dispatch = useProductSummaryDispatch()
const handles = useCssHandles(CSS_HANDLES)

// Use ProductListContext to send pixel events
/*
Use ProductListContext to send pixel events.
Beware that productListDispatch could be undefined if
this component is not wrapped by a <ProductListContextProvider/>.
In that case we don't need to send events.
*/
const { useProductListDispatch } = ProductListContext
const productListDispatch = useProductListDispatch()
const [inViewRef, inView] = useInView({
Expand Down

0 comments on commit eb21903

Please sign in to comment.