diff --git a/src/components/Layout/Nav.tsx b/src/components/Layout/Nav.tsx index 5d13e166..a3d97aed 100644 --- a/src/components/Layout/Nav.tsx +++ b/src/components/Layout/Nav.tsx @@ -1,8 +1,7 @@ -import { memo, useEffect, useMemo, useState } from 'preact/compat'; +import { memo, useEffect, useMemo, useState, useRef } from 'preact/compat'; import { NavLink, useLocation } from 'react-router-dom'; import { useGlobalState } from '../../GlobalStateProvider'; -import useBoolean from '../../hooks/useBoolean'; import { createLinks, LinkItem } from './links'; import { NavCollapseButtonContent } from './NavCollapseButtonContent'; @@ -25,17 +24,18 @@ const CollapseMenu = ({ const paths = path.split('/').filter(Boolean); return paths[1] && paths[1].startsWith(link.replace('/', '')) ? true : false; }, [link, pathname]); - const [isOpen, { toggle }] = useBoolean(isActive); + + const inputRef = useRef(null); return ( -
+
+ @@ -109,7 +109,7 @@ const Nav = memo(({ onClick }: NavProps) => { ariaControls="submenu" button={} > -