import PropTypes from 'prop-types'; import React from 'react'; import albumEntities from 'Album/albumEntities'; import AlbumTitleLink from 'Album/AlbumTitleLink'; import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector'; import ArtistNameLink from 'Artist/ArtistNameLink'; import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; function MissingRow(props) { const { id, artist, releaseDate, albumType, foreignAlbumId, title, disambiguation, isSelected, columns, onSelectedChange } = props; if (!artist) { return null; } return ( { columns.map((column) => { const { name, isVisible } = column; if (!isVisible) { return null; } if (name === 'artist.sortName') { return ( ); } if (name === 'albumTitle') { return ( ); } if (name === 'albumType') { return ( {albumType} ); } if (name === 'releaseDate') { return ( ); } if (name === 'actions') { return ( ); } return null; }) } ); } MissingRow.propTypes = { id: PropTypes.number.isRequired, artist: PropTypes.object.isRequired, releaseDate: PropTypes.string.isRequired, foreignAlbumId: PropTypes.string.isRequired, albumType: 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 MissingRow;