Skip to content

Commit

Permalink
Cleanup and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Jan 16, 2025
1 parent d85b05f commit a317221
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-penguins-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-cms': patch
---

Convert home to render the home CmsPage and add page/[…url] route for additional pages.
10 changes: 5 additions & 5 deletions examples/magento-open-source/pages/[...url].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ function CategoryPage(props: CategoryProps) {

return (
<PrivateQueryMaskProvider mask={productList.mask}>
<CategoryMeta params={params} {...category} />
<LayoutHeader floatingMd hideMd={import.meta.graphCommerce.breadcrumbs}>
<LayoutTitle size='small' component='span'>
{category?.name}
</LayoutTitle>
</LayoutHeader>
{isCategory && isLanding && (
<>
<CategoryMeta params={params} {...category} />

{import.meta.graphCommerce.breadcrumbs && (
<Container maxWidth={false}>
<CategoryBreadcrumbs
Expand All @@ -94,8 +93,6 @@ function CategoryPage(props: CategoryProps) {
)}
{isCategory && !isLanding && (
<>
<CategoryMeta params={params} {...category} />

{import.meta.graphCommerce.productFiltersPro &&
import.meta.graphCommerce.productFiltersLayout === 'SIDEBAR' && (
<ProductListLayoutSidebar
Expand Down Expand Up @@ -158,7 +155,10 @@ export const getStaticProps: GetPageStaticProps = async (context) => {

const staticClient = graphqlSsrClient(context)

const categoryPage = staticClient.query({ query: CategoryPageDocument, variables: { url } })
const categoryPage = staticClient.query({
query: CategoryPageDocument,
variables: { url },
})

const layout = staticClient.query({
query: LayoutDocument,
Expand Down

0 comments on commit a317221

Please sign in to comment.