import React, { useEffect, useState } from "react"; import ModalSettings from "../UI/ModalSettings/ModalSettings"; import link from "../../images/link.svg"; import archiveSet from "../../images/archive.svg"; import del from "../../images/delete.svg"; import edit from "../../images/edit.svg"; import "./projectTiket.scss"; export const ProjectTiket = ({ project, index, setOpenProject }) => { const [modalSettings, setModalSettings] = useState(false); useEffect(() => { initListeners(); }, []); function initListeners() { document.addEventListener("click", closeByClickingOut); } function closeByClickingOut(event) { const path = event.path || (event.composedPath && event.composedPath()); if ( event && !path.find((item) => item.classList && item.classList.contains("project")) ) { setModalSettings(false); } } return (

setOpenProject(true)}>{project.name}

Открытые задачи

{project.count} + setModalSettings(true)}> ...

редактировать

ссылка на проект

в архив

удалить

); }; export default ProjectTiket;