import React from "react"; import Avatar from "../common/Avatar"; import { getBucketNameById } from "./DirectoryUtils"; import { useBuckets } from "../../hooks/useDirectory"; import { getPhoneIcon } from "./DirectoryUtils"; import { useDir } from "../../Context/DireContext"; const CardViewDirectory = ({ IsActive, contact, setSelectedContact, setIsOpenModal, setOpen_contact, setIsOpenModalNote, IsDeleted, restore, }) => { const { buckets } = useBuckets(); const { dirActions, setDirActions } = useDir(); return (
{ if (IsActive) { setIsOpenModalNote(true); setOpen_contact(contact); } }}> {" "} {contact?.name}
{IsActive && (
)} {!IsActive && ( { setDirActions({ action: false, id: contact.id }); restore(contact.id); }} > )}
{ if (IsActive) { setIsOpenModalNote(true); setOpen_contact(contact); } }} >
{contact.contactEmails[0] && ( )} {contact.contactPhones[0] && ( )} {contact?.contactCategory?.name ? ( ) : ( )}
); }; export default CardViewDirectory;