Skip to content

Commit

Permalink
Hide ProductScroller components when no items are available
Browse files Browse the repository at this point in the history
  • Loading branch information
bramvanderholst authored and paales committed Dec 2, 2024
1 parent 5b3ce00 commit ebdf2c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/afraid-ants-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

Hide ProductScroller components when no items are available
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ProductScroller = forwardRef<HTMLDivElement, ProductScrollerProps>(

const Wrapper = useContext(AddProductsToCartContext) ? React.Fragment : AddProductsToCartForm

if (!items) return null
if (!items || !items.length) return null

return (
<Box sx={sx} ref={ref}>
Expand Down

0 comments on commit ebdf2c8

Please sign in to comment.