import { h } from 'preact';
import PropTypes from 'prop-types';
import SingleListing from '../singleListing';
const AllListings = ({
listings,
onAddTag,
onChangeCategory,
currentUserId,
onOpenModal,
}) => {
return (
{listings.map((listing) => (
))}
);
};
AllListings.propTypes = {
currentUserId: PropTypes.number,
listings: PropTypes.isRequired,
onAddTag: PropTypes.func.isRequired,
onChangeCategory: PropTypes.func.isRequired,
onOpenModal: PropTypes.func.isRequired,
};
AllListings.defaultProps = {
currentUserId: null,
};
export default AllListings;