import React, { useState } from "react"; import { backendImg } from "@utils/helper"; import { apiRequest } from "@api/request"; import close from "assets/icons/closeProjectPersons.svg"; const FileTracker = ({ file, setDeletedTask, taskId }) => { const [openImg, setOpenImg] = useState(false); function deleteFile(file) { apiRequest("/file/detach", { method: "DELETE", data: { file_id: file.file_id, entity_type: 2, entity_id: taskId, status: 0 } }).then(() => { setDeletedTask(file); }); } return (