@graphcommerce/magento-cart 3.0.13 → 3.1.0

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.1.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.0.13...@graphcommerce/magento-cart@3.1.0) (2021-10-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **checkout-shipping:** edit shipping address link ([b598008](https://github.com/ho-nl/m2-pwa/commit/b598008ffccb499fe0109ee557e08d557cf20d6e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.0.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.0.8...@graphcommerce/magento-cart@3.0.9) (2021-09-30)
7
18
 
8
19
 
@@ -1,3 +1,4 @@
1
+ import { useHistoryLink } from '@graphcommerce/framer-next-pages'
1
2
  import { SectionContainer, UseStyles } from '@graphcommerce/next-ui'
2
3
  import { Link, makeStyles, Theme, Typography } from '@material-ui/core'
3
4
  import PageLink from 'next/link'
@@ -53,6 +54,10 @@ export default function CartSummary(props: CartSummaryProps) {
53
54
 
54
55
  const { email, shipping_addresses, billing_address } = data.cart
55
56
 
57
+ const { href: historyHref, onClick: historyOnClick } = useHistoryLink({
58
+ href: '/checkout',
59
+ })
60
+
56
61
  return (
57
62
  <div className={classes.root}>
58
63
  <div className={classes.detailsContainer}>
@@ -61,15 +66,6 @@ export default function CartSummary(props: CartSummaryProps) {
61
66
  variantLeft='h5'
62
67
  labelLeft='Confirmation + Track & trace'
63
68
  classes={{ sectionHeaderWrapper: classes.sectionHeaderWrapper }}
64
- // labelRight={
65
- // editable ? (
66
- // <PageLink href='/checkout/edit' passHref>
67
- // <Link color='secondary' variant='body2'>
68
- // Edit
69
- // </Link>
70
- // </PageLink>
71
- // ) : undefined
72
- // }
73
69
  />
74
70
  <Typography variant='body1'>{email || ''}</Typography>
75
71
  </div>
@@ -78,15 +74,6 @@ export default function CartSummary(props: CartSummaryProps) {
78
74
  variantLeft='h5'
79
75
  labelLeft='Shipping method'
80
76
  classes={{ sectionHeaderWrapper: classes.sectionHeaderWrapper }}
81
- // labelRight={
82
- // editable ? (
83
- // <PageLink href='/checkout/edit/shipping' passHref>
84
- // <Link color='secondary' variant='body2'>
85
- // Edit
86
- // </Link>
87
- // </PageLink>
88
- // ) : undefined
89
- // }
90
77
  />
91
78
  <Typography variant='body1'>
92
79
  {shipping_addresses?.[0]?.selected_shipping_method?.carrier_title}
@@ -100,15 +87,15 @@ export default function CartSummary(props: CartSummaryProps) {
100
87
  variantLeft='h5'
101
88
  labelLeft='Shipping address'
102
89
  classes={{ sectionHeaderWrapper: classes.sectionHeaderWrapper }}
103
- // labelRight={
104
- // editable ? (
105
- // <PageLink href='/checkout/edit/shipping_address' passHref>
106
- // <Link color='secondary' variant='body2'>
107
- // Edit
108
- // </Link>
109
- // </PageLink>
110
- // ) : undefined
111
- // }
90
+ labelRight={
91
+ editable ? (
92
+ <PageLink href={historyHref} passHref>
93
+ <Link color='secondary' variant='body2' onClick={historyOnClick}>
94
+ Edit
95
+ </Link>
96
+ </PageLink>
97
+ ) : undefined
98
+ }
112
99
  />
113
100
  <CartAddressMultiLine {...shipping_addresses[0]} />
114
101
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart",
3
- "version": "3.0.13",
3
+ "version": "3.1.0",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -38,5 +38,5 @@
38
38
  "react": "^17.0.2",
39
39
  "react-dom": "^17.0.2"
40
40
  },
41
- "gitHead": "148ed6eb34bf3b3da72c1791c4195d8d141bc6e6"
41
+ "gitHead": "bffc2d42dc3f1e6a95cbff7025ede389693f8a54"
42
42
  }