@graphcommerce/next-ui 3.15.1 → 3.15.2
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.
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { makeStyles, StyleRules, Theme } from '@material-ui/core'
|
|
13
13
|
import { useDomEvent } from 'framer-motion'
|
|
14
14
|
import { useRouter } from 'next/router'
|
|
15
|
-
import React, { useRef } from 'react'
|
|
15
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
16
16
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
17
17
|
import AppShellProvider from '../AppShellProvider'
|
|
18
18
|
import ShellBase, { PageLayoutBaseProps } from '../ShellBase'
|
|
@@ -63,11 +63,15 @@ function SheetShellBase(props: SheetShellBaseProps) {
|
|
|
63
63
|
const { depth, closeSteps, active, direction } = usePageContext()
|
|
64
64
|
const open = depth < 0 || router.asPath === pageRouter.asPath
|
|
65
65
|
const initialLocale = useRef(router.locale)
|
|
66
|
+
const [isNavigating, setIsNavigating] = useState<boolean>(false)
|
|
66
67
|
|
|
67
68
|
function handleClose() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (!isNavigating) {
|
|
70
|
+
setIsNavigating(true)
|
|
71
|
+
return initialLocale.current !== router.locale
|
|
72
|
+
? pageRouter.push('/')
|
|
73
|
+
: pageRouter.go(closeSteps * -1)
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
function handleSnap(snapPoint: SnapPoint) {
|
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.15.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.1...@graphcommerce/next-ui@3.15.2) (2021-11-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **sheet-shell-base:** prevent sheet backdrop from navigating back multiple times ([5ca2f7e](https://github.com/ho-nl/m2-pwa/commit/5ca2f7e0d3404501a6b5763daf1d442c8080f8cb))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.15.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.0...@graphcommerce/next-ui@3.15.1) (2021-11-11)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"project": "./tsconfig.json"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "47e8be849eaecea00f8673696ae1ec3283ec5fd6"
|
|
57
57
|
}
|