@graphcommerce/magento-review 3.1.8 → 3.2.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,36 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.2.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
+ ## 3.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#1416](https://github.com/graphcommerce-org/graphcommerce/pull/1416) [`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - SEO audit
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
19
+ - @graphcommerce/magento-product@4.2.0
20
+ - @graphcommerce/magento-store@4.2.0
21
+ - @graphcommerce/next-ui@4.7.0
22
+ - @graphcommerce/magento-customer@4.2.8
23
+
24
+ ## 3.1.9
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [[`ba8cd4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/ba8cd4d3480a7ec7e555b051cfd0fbc809c7aa12)]:
29
+ - @graphcommerce/graphql-mesh@4.1.2
30
+ - @graphcommerce/magento-customer@4.2.7
31
+ - @graphcommerce/magento-product@4.1.11
32
+ - @graphcommerce/magento-store@4.1.9
33
+
3
34
  ## 3.1.8
4
35
 
5
36
  ### Patch Changes
@@ -7,7 +7,7 @@ import {
7
7
  } from '@graphcommerce/next-ui'
8
8
  import { Trans } from '@lingui/macro'
9
9
  import { Typography, Button, Box, SxProps, Theme, Link } from '@mui/material'
10
- import PageLink from 'next/link'
10
+ import { useRouter } from 'next/router'
11
11
  import React, { useState } from 'react'
12
12
  import { ProductReviewChip } from '../ProductReviewChip/ProductReviewChip'
13
13
  import { ProductReviewsFragment } from './ProductReviews.gql'
@@ -36,6 +36,7 @@ export function ProductReviews(props: ProductReviewsProps) {
36
36
  const { reviews, url_key, sx = [] } = props
37
37
  const config = 'en_US'
38
38
  const locale = config.replace('_', '-')
39
+ const router = useRouter()
39
40
 
40
41
  const [reviewPage, setPage] = useState<number>(1)
41
42
 
@@ -74,21 +75,20 @@ export function ProductReviews(props: ProductReviewsProps) {
74
75
  marginTop: theme.spacings.sm,
75
76
  })}
76
77
  >
77
- <PageLink href={`/account/reviews/add?url_key=${url_key}`} passHref>
78
- <Button
79
- variant='pill'
80
- color='primary'
81
- size='medium'
82
- className={classes.writeReviewButton}
83
- sx={(theme) => ({
84
- [theme.breakpoints.down('sm')]: {
85
- whiteSpace: 'nowrap',
86
- },
87
- })}
88
- >
89
- <Trans>Write a review</Trans>
90
- </Button>
91
- </PageLink>
78
+ <Button
79
+ variant='pill'
80
+ color='primary'
81
+ size='medium'
82
+ className={classes.writeReviewButton}
83
+ onClick={() => router.push(`/account/reviews/add?url_key=${url_key}`)}
84
+ sx={(theme) => ({
85
+ [theme.breakpoints.down('sm')]: {
86
+ whiteSpace: 'nowrap',
87
+ },
88
+ })}
89
+ >
90
+ <Trans>Write a review</Trans>
91
+ </Button>
92
92
 
93
93
  {!!total_pages && total_pages > 1 && (
94
94
  <Pagination
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-review",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.1.8",
5
+ "version": "3.2.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,12 +19,12 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@graphcommerce/graphql": "3.1.1",
22
- "@graphcommerce/graphql-mesh": "4.1.1",
22
+ "@graphcommerce/graphql-mesh": "4.1.2",
23
23
  "@graphcommerce/image": "3.1.5",
24
- "@graphcommerce/magento-customer": "4.2.6",
25
- "@graphcommerce/magento-product": "4.1.10",
26
- "@graphcommerce/magento-store": "4.1.8",
27
- "@graphcommerce/next-ui": "4.6.2",
24
+ "@graphcommerce/magento-customer": "4.2.8",
25
+ "@graphcommerce/magento-product": "4.3.0",
26
+ "@graphcommerce/magento-store": "4.2.0",
27
+ "@graphcommerce/next-ui": "4.7.0",
28
28
  "@graphcommerce/react-hook-form": "3.1.2",
29
29
  "schema-dts": "^1.1.0"
30
30
  },