import {Card, Popconfirm, Tooltip} from "antd"; import PropTypes from "prop-types"; import {DeleteOutlined, EditOutlined, EyeOutlined} from "@ant-design/icons"; import {useState} from "react"; import LensViewModal from "./LensViewModal.jsx"; import {LensPropType} from "../../types/lensPropType.jsx"; const LensListCard = ({lens, handleEditLens, handleDeleteLens}) => { const [showModalInfo, setShowModalInfo] = useState(false); const deleteLens = () => { handleDeleteLens(lens.id); } const handleViewLens = () => { setShowModalInfo(true); }; const actions = [ , handleEditLens(lens)}/> , , ]; return ( <>

🔬 Тор: {lens.tor} D

📏 Диаметр: {lens.diameter} мм

🔄 Пресетная рефракция: {lens.preset_refraction} D

⚙️ Периферийная торичность: {lens.periphery_toricity} D

{lens.issued &&

✅ Линза выдана

}
setShowModalInfo(false)} lens={lens} /> ); }; LensListCard.propTypes = { lens: LensPropType.isRequired, handleEditLens: PropTypes.func.isRequired, handleDeleteLens: PropTypes.func.isRequired, }; export default LensListCard;