import React from 'react'; import Modal from 'components/Modal'; import { isItemAFolder } from 'utils/tabs'; import { useDispatch } from 'react-redux'; import { closeTab } from 'providers/ReduxStore/slices/tabs'; import { deleteItem } from 'providers/ReduxStore/slices/collections'; import StyledWrapper from './StyledWrapper'; const DeleteCollectionItem = ({onClose, item, collection}) => { const dispatch = useDispatch(); const isFolder = isItemAFolder(item); const onConfirm = () =>{ dispatch(closeTab({ tabUid: item.uid })); dispatch(deleteItem(item.uid, collection.uid)); onClose(); }; return ( Are you sure you want to delete {item.name} ? ); }; export default DeleteCollectionItem;