import PropTypes from 'prop-types'; import { h } from 'preact'; export const SingleListing = ({ listing, onAddTag, currentUserId, onChangeCategory, onOpenModal, isOpen, }) => { const tagLinks = listing.tag_list.map(tag => ( onAddTag(e, tag)} data-no-instant > {tag} )); const editButton = currentUserId === listing.user_id ? ( ・edit ) : ( ・report abuse ); const locationText = listing.location ? ( ・ {listing.location} ) : ( '' ); const definedClass = isOpen ? 'single-classified-listing single-classified-listing--opened' : 'single-classified-listing'; const listingCard = () => { return (