import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import Modal from 'components/Modal'; import { IconTrash } from '@tabler/icons'; import { deleteCookiesForDomain } from 'providers/ReduxStore/slices/app'; import toast from 'react-hot-toast'; import StyledWrapper from './StyledWrapper'; const CollectionProperties = ({ onClose }) => { const dispatch = useDispatch(); const cookies = useSelector((state) => state.app.cookies) || []; const handleDeleteDomain = (domain) => { dispatch(deleteCookiesForDomain(domain)) .then(() => { toast.success('Domain deleted successfully'); }) .catch((err) => console.log(err) && toast.error('Failed to delete domain')); }; return ( {cookies.map((cookie) => ( ))}
Domain Cookie Actions
{cookie.domain} {cookie.cookieString}
); }; export default CollectionProperties;