import React, { useState, forwardRef, useRef } from 'react'; import Toast from 'components/Toast'; import Dropdown from 'components/Dropdown'; import { useDispatch } from 'react-redux'; import { createCollection } from 'providers/ReduxStore/slices/collections'; import { IconDots } from '@tabler/icons'; import CreateCollection from '../CreateCollection'; import StyledWrapper from './StyledWrapper'; const TitleBar = () => { const [modalOpen, setModalOpen] = useState(false); const [showToast, setShowToast] = useState({show: false}); const dispatch = useDispatch(); const menuDropdownTippyRef = useRef(); const onMenuDropdownCreate = (ref) => menuDropdownTippyRef.current = ref; const MenuIcon = forwardRef((props, ref) => { return (