diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index 20ce57c..bd6908d 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -14,6 +14,7 @@ export default function Dropdown(props: Props) { const [isOpen, setIsOpen] = useState(false); const menuItems = item?.children ? item.children : []; const lastIndex = menuItems.length - 1; + const itemId = item.id; const toggle = () => { setIsOpen(old => !old); @@ -29,6 +30,10 @@ export default function Dropdown(props: Props) { return lastIndex == menuItems.indexOf(currentItem) } + function isSecondItem (currentItem: MenuItem) { + return 1 == menuItems.indexOf(currentItem) + } + return ( <>
@@ -41,8 +46,14 @@ export default function Dropdown(props: Props) { menuItems.map(item => <>