Skip to content

Commit

Permalink
Merge pull request #2145 from graphcommerce-org/bug/GCOM-1293-subcate…
Browse files Browse the repository at this point in the history
…gory-pagination

Bug/gcom 1293 subcategory pagination
  • Loading branch information
paales authored Dec 11, 2023
2 parents 351ef91 + 4fc2fda commit 6127524
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rotten-balloons-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-category': patch
---

Fixed a bug where pagination would be added when navigating to a subcategory from a paginated page
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const { classes } = extendableComponent(name, parts)
export function CategoryChildren(props: CategoryChildrenProps) {
const { children, params, sx = [] } = props

const { currentPage, ...paramsWithoutCurrentPage } = params

if (!children || children.length === 0) return null

return (
Expand Down Expand Up @@ -46,7 +48,7 @@ export function CategoryChildren(props: CategoryChildrenProps) {
underline='none'
color='inherit'
href={productListLink({
...params,
...paramsWithoutCurrentPage,
url: cat.url_path,
filters: { category_uid: { eq: cat.uid } },
})}
Expand Down

1 comment on commit 6127524

@vercel
Copy link

@vercel vercel bot commented on 6127524 Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

graphcommerce-hygraph-dynamic-rows-ui – ./packages/hygraph-dynamic-rows-ui

graphcommerce-hygraph-dynamic-rows-ui-git-canary-graphcommerce.vercel.app
graphcommerce-hygraph-dynamic-rows-ui-graphcommerce.vercel.app
graphcommerce-hygraph-dynamic-rows-ui.vercel.app

Please sign in to comment.