From 30382d088b3b0a5b21ef94d1eb7b7f042dca0fd7 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 4 Apr 2024 14:34:04 +0800 Subject: [PATCH] Possible fix for menus again --- src/components/nav-menu.jsx | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/components/nav-menu.jsx b/src/components/nav-menu.jsx index 9952d0dd..e5659838 100644 --- a/src/components/nav-menu.jsx +++ b/src/components/nav-menu.jsx @@ -209,7 +209,7 @@ function NavMenu(props) { )} {lists?.length > 0 ? ( - )} - + ) : ( @@ -244,7 +244,7 @@ function NavMenu(props) { Bookmarks - Blocked users… {' '} - + { @@ -371,4 +371,27 @@ function NavMenu(props) { ); } +function SubMenu2(props) { + const menuRef = useRef(); + return ( + { + if (e.pointerType === 'touch') { + menuRef.current?.openMenu?.(); + } + }, + onPointerLeave: (e) => { + if (e.pointerType === 'touch') { + menuRef.current?.openMenu?.(); + } + }, + }} + /> + ); +} + export default memo(NavMenu);