import React from "react" import { Nav, NavItem, useCollapsible } from "../.." const CollapsibleNav = (props) => { const navItems = ["Overview", "Albums", "Similar Artists"] // eslint-disable-next-line react-hooks/rules-of-hooks const collapsibles = navItems.map(() => useCollapsible(true)) const handleMainClick = (index) => { collapsibles.forEach(([, , setCollapsed], idx) => { if (idx === index) { setCollapsed(false) } else { setCollapsed(true) } }) } const handleIconRightClick = (index) => { const [isCollapsed, setCollapsed] = collapsibles[index] setCollapsed(!isCollapsed) } return ( <> ) } export default CollapsibleNav