fix(web): prevent navbar clearing app state on cmd+click (#28935)
This commit is contained in:
@@ -52,7 +52,12 @@ const Nav = ({
|
|||||||
`}>
|
`}>
|
||||||
<Link href={link + (linkLastSearchParams && `?${linkLastSearchParams}`)}>
|
<Link href={link + (linkLastSearchParams && `?${linkLastSearchParams}`)}>
|
||||||
<div
|
<div
|
||||||
onClick={() => setAppDetail()}
|
onClick={(e) => {
|
||||||
|
// Don't clear state if opening in new tab/window
|
||||||
|
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0)
|
||||||
|
return
|
||||||
|
setAppDetail()
|
||||||
|
}}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'flex h-7 cursor-pointer items-center rounded-[10px] px-2.5',
|
'flex h-7 cursor-pointer items-center rounded-[10px] px-2.5',
|
||||||
isActivated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text',
|
isActivated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text',
|
||||||
|
|||||||
Reference in New Issue
Block a user