@graphcommerce/magento-cart-payment-method 3.3.5 → 3.4.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
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1544](https://github.com/graphcommerce-org/graphcommerce/pull/1544) [`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Fixed hydration errors on account, cart and wishlist
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c87a28e7d`](https://github.com/graphcommerce-org/graphcommerce/commit/c87a28e7dad87bffd0bd125ad5fdca65aaa389cc), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]:
|
|
12
|
+
- @graphcommerce/graphql@3.4.0
|
|
13
|
+
- @graphcommerce/magento-cart@4.5.0
|
|
14
|
+
- @graphcommerce/react-hook-form@3.3.0
|
|
15
|
+
- @graphcommerce/next-ui@4.12.0
|
|
16
|
+
- @graphcommerce/magento-store@4.2.15
|
|
17
|
+
- @graphcommerce/framer-scroller@2.1.21
|
|
18
|
+
|
|
3
19
|
## 3.3.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -13,18 +13,18 @@ export function PaymentMethodPlaceOrderNoop(props: PaymentPlaceOrderProps) {
|
|
|
13
13
|
const { step, code } = props
|
|
14
14
|
const clearCurrentCartId = useClearCurrentCartId()
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const { currentCartId } = useCurrentCartId()
|
|
17
17
|
const form = useFormGqlMutationCart(PaymentMethodPlaceOrderNoopDocument)
|
|
18
18
|
|
|
19
19
|
const { handleSubmit, data, error } = form
|
|
20
20
|
const { push } = useRouter()
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
|
-
if (!data?.placeOrder?.order || error || !
|
|
23
|
+
if (!data?.placeOrder?.order || error || !currentCartId) return
|
|
24
24
|
clearCurrentCartId()
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
26
|
-
push({ pathname: '/checkout/success', query: { cart_id:
|
|
27
|
-
}, [
|
|
26
|
+
push({ pathname: '/checkout/success', query: { cart_id: currentCartId } })
|
|
27
|
+
}, [clearCurrentCartId, currentCartId, data?.placeOrder?.order, error, push])
|
|
28
28
|
|
|
29
29
|
const submit = handleSubmit(() => {})
|
|
30
30
|
|
package/hooks/useCartLock.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type CartLockState = {
|
|
|
15
15
|
* Todo: Block all operations on the cart while the cart is being blocked.
|
|
16
16
|
*/
|
|
17
17
|
export function useCartLock<E extends CartLockState>() {
|
|
18
|
-
const currentCartId = useCurrentCartId()
|
|
18
|
+
const { currentCartId } = useCurrentCartId()
|
|
19
19
|
const [justLocked, setJustLocked] = useState(false)
|
|
20
20
|
const [queryState, setRouterQuery] = useUrlQuery<E>()
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ export function useCartLock<E extends CartLockState>() {
|
|
|
26
26
|
locked: '1',
|
|
27
27
|
cart_id: currentCartId,
|
|
28
28
|
...params,
|
|
29
|
-
} as E)
|
|
29
|
+
} as unknown as E)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const unlock = (params: Omit<E, 'locked' | 'cart_id' | 'method'>) => {
|
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": "3.
|
|
5
|
+
"version": "3.4.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"@graphcommerce/eslint-config-pwa": "^4.1.8",
|
|
16
16
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
17
|
"@graphcommerce/typescript-config-pwa": "^4.0.3",
|
|
18
|
-
"@graphcommerce/magento-cart-shipping-address": "3.2.
|
|
18
|
+
"@graphcommerce/magento-cart-shipping-address": "3.2.5",
|
|
19
19
|
"@playwright/test": "^1.21.1",
|
|
20
20
|
"type-fest": "^2.12.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
24
|
-
"@graphcommerce/graphql": "3.
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.21",
|
|
24
|
+
"@graphcommerce/graphql": "3.4.0",
|
|
25
25
|
"@graphcommerce/image": "3.1.7",
|
|
26
|
-
"@graphcommerce/magento-cart": "4.
|
|
27
|
-
"@graphcommerce/magento-store": "4.2.
|
|
28
|
-
"@graphcommerce/next-ui": "4.
|
|
29
|
-
"@graphcommerce/react-hook-form": "3.
|
|
26
|
+
"@graphcommerce/magento-cart": "4.5.0",
|
|
27
|
+
"@graphcommerce/magento-store": "4.2.15",
|
|
28
|
+
"@graphcommerce/next-ui": "4.12.0",
|
|
29
|
+
"@graphcommerce/react-hook-form": "3.3.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@lingui/react": "^3.13.2",
|