import PropTypes from 'prop-types'; import { h } from 'preact'; import Header from './Header'; import TagLinks from './TagLinks'; import AuthorInfo from './AuthorInfo'; import listingPropTypes from './listingPropTypes'; const SingleListing = ({ listing, currentUserId, onAddTag, onChangeCategory, onOpenModal, isOpen, }) => { const definedClass = isOpen ? 'single-classified-listing single-classified-listing--opened' : 'single-classified-listing'; return (
); }; SingleListing.propTypes = { listing: listingPropTypes.isRequired, onAddTag: PropTypes.func.isRequired, onOpenModal: PropTypes.func.isRequired, onChangeCategory: PropTypes.func.isRequired, isOpen: PropTypes.bool.isRequired, currentUserId: PropTypes.number, }; SingleListing.defaultProps = { currentUserId: null, }; export default SingleListing;