mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 07:26:59 +00:00
Fix navigation between cart and menu on mobile
On mobile when the Sidebar menu is open and you want to switch to cart, it would toggle the sidebar and close it instead of switching view.
This commit is contained in:
parent
6e6db0773b
commit
c5cc9390a3
@ -35,7 +35,7 @@ const UserNav: FC<Props> = ({ className }) => {
|
||||
variant="naked"
|
||||
onClick={() => {
|
||||
setSidebarView('CART_VIEW')
|
||||
toggleSidebar()
|
||||
openSidebar()
|
||||
}}
|
||||
aria-label={`Cart items: ${itemsCount}`}
|
||||
>
|
||||
@ -76,7 +76,7 @@ const UserNav: FC<Props> = ({ className }) => {
|
||||
variant="naked"
|
||||
onClick={() => {
|
||||
setSidebarView('MOBILEMENU_VIEW')
|
||||
toggleSidebar()
|
||||
openSidebar()
|
||||
}}
|
||||
aria-label="Menu"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user