@graphcommerce/magento-cart-payment-method 9.1.0-canary.53 → 9.1.0-canary.55

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.55
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2539](https://github.com/graphcommerce-org/graphcommerce/pull/2539) [`59d91cc`](https://github.com/graphcommerce-org/graphcommerce/commit/59d91cc4b04b6d37e5fb6b09401c079de488bc29) - Solve issue where the Place order button would remain in a loading state because the back/forward cache of chrome started working for the checkout and thus React's state would not be reset, thinking we were still exiting the page. ([@paales](https://github.com/paales))
8
+
9
+ ## 9.1.0-canary.54
10
+
3
11
  ## 9.1.0-canary.53
4
12
 
5
13
  ## 9.1.0-canary.52
@@ -1,5 +1,6 @@
1
1
  import { useCartQuery, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
2
2
  import { useFormAutoSubmit, useFormCompose } from '@graphcommerce/react-hook-form'
3
+ import { useEffect } from 'react'
3
4
  import type { PaymentOptionsProps } from '../Api/PaymentMethod'
4
5
  import { GetPaymentMethodContextDocument } from '../PaymentMethodContext/GetPaymentMethodContext.gql'
5
6
  import { PaymentMethodOptionsNoopDocument } from './PaymentMethodOptionsNoop.gql'
@@ -31,6 +32,13 @@ export function PaymentMethodOptionsNoop(props: PaymentOptionsProps) {
31
32
  /** To use an external Pay button we register the current form to be handled there as well. */
32
33
  useFormCompose({ form, step, submit, key: `PaymentMethodOptions_${code}` })
33
34
 
35
+ useEffect(() => {
36
+ window.onunload = () => {
37
+ // Break the backforwardcache
38
+ console.log('Unload event triggered, to prevent the backforward cache from working.')
39
+ }
40
+ }, [])
41
+
34
42
  /**
35
43
  * This is the form that the user can fill in. In this case we don't wat the user to fill in
36
44
  * anything.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-payment-method",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.53",
5
+ "version": "9.1.0-canary.55",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.53",
16
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.53",
17
- "@graphcommerce/framer-scroller": "^9.1.0-canary.53",
18
- "@graphcommerce/graphql": "^9.1.0-canary.53",
19
- "@graphcommerce/image": "^9.1.0-canary.53",
20
- "@graphcommerce/magento-cart": "^9.1.0-canary.53",
21
- "@graphcommerce/magento-cart-shipping-address": "^9.1.0-canary.53",
22
- "@graphcommerce/magento-store": "^9.1.0-canary.53",
23
- "@graphcommerce/next-ui": "^9.1.0-canary.53",
24
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.53",
25
- "@graphcommerce/react-hook-form": "^9.1.0-canary.53",
26
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.53",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.55",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
17
+ "@graphcommerce/framer-scroller": "^9.1.0-canary.55",
18
+ "@graphcommerce/graphql": "^9.1.0-canary.55",
19
+ "@graphcommerce/image": "^9.1.0-canary.55",
20
+ "@graphcommerce/magento-cart": "^9.1.0-canary.55",
21
+ "@graphcommerce/magento-cart-shipping-address": "^9.1.0-canary.55",
22
+ "@graphcommerce/magento-store": "^9.1.0-canary.55",
23
+ "@graphcommerce/next-ui": "^9.1.0-canary.55",
24
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
25
+ "@graphcommerce/react-hook-form": "^9.1.0-canary.55",
26
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55",
27
27
  "@lingui/core": "^4.2.1",
28
28
  "@lingui/macro": "^4.2.1",
29
29
  "@lingui/react": "^4.2.1",