diff --git a/package.json b/package.json index 5d7376c..5cac9b3 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "react-icons": "^5.0.1", "react-router-dom": "^6.20.0", "react-script": "^2.0.5", + "react-icons": "^5.0.1", "yup": "^1.3.2" }, "lint-staged": { diff --git a/src/components/Catalog/CatalogTable.jsx b/src/components/Catalog/CatalogTable.jsx index dd42575..9922da8 100644 --- a/src/components/Catalog/CatalogTable.jsx +++ b/src/components/Catalog/CatalogTable.jsx @@ -1,9 +1,9 @@ import { Container, Badge, IconButton, Table, Thead, Tr, Th, Td, Tbody } from '@chakra-ui/react'; -import { EditIcon, DeleteIcon } from '@chakra-ui/icons'; +import { /*EditIcon,*/ DeleteIcon } from '@chakra-ui/icons'; // add 'EditIcon' to reinstate edit button. import s from './Catalog.module.css'; import PropTypes from 'prop-types'; -const CatalogTable = ({ tableData, handleEditForm, handleDeleteClick }) => { +const CatalogTable = ({ tableData, /*handleEditForm,*/ handleDeleteClick }) => { return ( @@ -15,7 +15,7 @@ const CatalogTable = ({ tableData, handleEditForm, handleDeleteClick }) => { - {tableData.map(({ id, host, title, eventType, subject, year, season, description }) => ( + {tableData.map(({ id, host, title, eventType, subject, year, season/*, description*/ }) => (
{title} @@ -80,7 +80,7 @@ const CatalogTable = ({ tableData, handleEditForm, handleDeleteClick }) => { - { description, }) } - /> + /> */} { CatalogTable.propTypes = { tableData: PropTypes.arrayOf(PropTypes.any), - handleEditForm: PropTypes.func.isRequired, + // handleEditForm: PropTypes.func.isRequired, handleDeleteClick: PropTypes.func.isRequired, }; diff --git a/src/pages/Catalog/Catalog.jsx b/src/pages/Catalog/Catalog.jsx index 4923f76..243a5a6 100644 --- a/src/pages/Catalog/Catalog.jsx +++ b/src/pages/Catalog/Catalog.jsx @@ -30,11 +30,11 @@ import { export default function Catalog() { const { isOpen: isDeleteOpen, onOpen: onDeleteOpen, onClose: onDeleteClose } = useDisclosure(); - const { - isOpen: isEditFormOpen, - onOpen: onEditFormOpen, - onClose: onEditFormClose, - } = useDisclosure(); + // const { + // isOpen: isEditFormOpen, + // onOpen: onEditFormOpen, + // onClose: onEditFormClose, + // } = useDisclosure(); const { isOpen: isCreateFormOpen, onOpen: onCreateFormOpen, @@ -45,7 +45,7 @@ export default function Catalog() { const [dataShouldRevalidate, setDataShouldRevalidate] = useState(false); const [totalRowCount, setTotalRowCount] = useState(0); const [deleteItemId, setDeleteItemId] = useState(-1); - const [editData, setEditData] = useState({}); + // const [editData, setEditData] = useState({}); const [searchTerm, setSearchTerm] = useState(''); const { filters, clearFilters, filterValues } = useSearchFilters(); @@ -56,10 +56,10 @@ export default function Catalog() { pagesCount: Math.ceil(totalRowCount / 10), }); - const handleEditForm = data => { - setEditData(data); - onEditFormOpen(); - }; + // const handleEditForm = data => { + // setEditData(data); + // onEditFormOpen(); + // }; const handleDeleteClick = id => { setDeleteItemId(id); @@ -186,7 +186,7 @@ export default function Catalog() { > - + /> */}