import React, { useState, forwardRef, useRef } from 'react'; import get from 'lodash/get'; import classnames from 'classnames'; import { IconChevronRight, IconDots } from '@tabler/icons'; import Dropdown from 'components/Dropdown'; import { collectionClicked } from 'providers/ReduxStore/slices/collections'; import { useDispatch } from 'react-redux'; import NewRequest from 'components/Sidebar/NewRequest'; import NewFolder from 'components/Sidebar/NewFolder'; import CollectionItem from './CollectionItem'; import StyledWrapper from './StyledWrapper'; const Collection = ({collection}) => { const [showNewFolderModal, setShowNewFolderModal] = useState(false); const [showNewRequestModal, setShowNewRequestModal] = useState(false); const dispatch = useDispatch(); const menuDropdownTippyRef = useRef(); const onMenuDropdownCreate = (ref) => menuDropdownTippyRef.current = ref; const MenuIcon = forwardRef((props, ref) => { return (