import PropTypes from 'prop-types'; import React from 'react'; import AuthorNameLink from 'Author/AuthorNameLink'; import bookEntities from 'Book/bookEntities'; import BookSearchCellConnector from 'Book/BookSearchCellConnector'; import BookTitleLink from 'Book/BookTitleLink'; import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import TableRow from 'Components/Table/TableRow'; function CutoffUnmetRow(props) { const { id, author, releaseDate, titleSlug, title, disambiguation, isSelected, columns, onSelectedChange } = props; if (!author) { return null; } return ( { columns.map((column) => { const { name, isVisible } = column; if (!isVisible) { return null; } if (name === 'authorMetadata.sortName') { return ( ); } if (name === 'books.title') { return ( ); } if (name === 'releaseDate') { return ( ); } if (name === 'actions') { return ( ); } return null; }) } ); } CutoffUnmetRow.propTypes = { id: PropTypes.number.isRequired, bookFileId: PropTypes.number, author: PropTypes.object.isRequired, releaseDate: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, title: PropTypes.string.isRequired, disambiguation: PropTypes.string, isSelected: PropTypes.bool, columns: PropTypes.arrayOf(PropTypes.object).isRequired, onSelectedChange: PropTypes.func.isRequired }; export default CutoffUnmetRow;