@graphcommerce/magento-category 4.0.14 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`669a17a97`](https://github.com/graphcommerce-org/graphcommerce/commit/669a17a973c47c00fed4a649a9da0bfc5670c5da)]:
8
+ - @graphcommerce/magento-product@4.3.0
9
+
10
+ ## 4.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#1434](https://github.com/graphcommerce-org/graphcommerce/pull/1434) [`3c1c9ce2a`](https://github.com/graphcommerce-org/graphcommerce/commit/3c1c9ce2a947386515df019c31d697114a87dc07) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Add page number to meta title and description
15
+
16
+ ## 4.0.15
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
21
+ - @graphcommerce/magento-product@4.2.0
22
+ - @graphcommerce/magento-store@4.2.0
23
+ - @graphcommerce/next-ui@4.7.0
24
+ - @graphcommerce/framer-scroller@2.1.8
25
+
3
26
  ## 4.0.14
4
27
 
5
28
  ### Patch Changes
@@ -6,16 +6,22 @@ import { CategoryMetaFragment } from './CategoryMeta.gql'
6
6
  type CategoryMetaProps = CategoryMetaFragment &
7
7
  Omit<PageMetaProps, 'title' | 'metaDescription'> & {
8
8
  params?: ProductListParams
9
+ current_page?: number | null | undefined
9
10
  }
10
11
 
11
12
  export function CategoryMeta(props: CategoryMetaProps) {
12
- const { name, meta_title, meta_description, params, ...pageMetaProps } = props
13
+ const { name, meta_title, meta_description, current_page, params, ...pageMetaProps } = props
14
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
13
15
  const anyFilterActive = Object.keys(params?.filters ?? {}).length > 0
14
16
 
15
17
  return (
16
18
  <PageMeta
17
- title={meta_title ?? name ?? ''}
18
- metaDescription={meta_description ?? undefined}
19
+ title={`${meta_title ?? name ?? ''} ${
20
+ current_page && current_page > 1 ? `- Page ${current_page}` : ''
21
+ }`}
22
+ metaDescription={`${meta_description ?? undefined} ${
23
+ current_page && current_page > 1 ? `- Page ${current_page}` : ''
24
+ }`}
19
25
  metaRobots={anyFilterActive ? ['noindex'] : undefined}
20
26
  canonical={`/${params?.url}${
21
27
  (params?.currentPage ?? 1) > 1 ? `/q/page/${params?.currentPage}` : ''
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-category",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.0.14",
5
+ "version": "4.1.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,12 +19,12 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "2.1.7",
22
+ "@graphcommerce/framer-scroller": "2.1.8",
23
23
  "@graphcommerce/graphql": "3.1.1",
24
24
  "@graphcommerce/image": "3.1.5",
25
- "@graphcommerce/magento-product": "4.1.11",
26
- "@graphcommerce/magento-store": "4.1.9",
27
- "@graphcommerce/next-ui": "4.6.2"
25
+ "@graphcommerce/magento-product": "4.3.0",
26
+ "@graphcommerce/magento-store": "4.2.0",
27
+ "@graphcommerce/next-ui": "4.7.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@lingui/macro": "^3.13.2",