import PropTypes from 'prop-types'; import { h } from 'preact'; import { listingPropTypes } from './listingPropTypes'; const LocationText = ({ location }) => { return location ? ( ・{location} ) : ( '' ); }; LocationText.propTypes = { location: PropTypes.string, }; LocationText.defaultProps = { location: null, }; export const AuthorInfo = ({ listing, onCategoryClick }) => { const { category, location, author = {} } = listing; const { username, name, profile_image_90 } = author; return (
); }; AuthorInfo.propTypes = { listing: listingPropTypes.isRequired, onCategoryClick: PropTypes.func, }; AuthorInfo.defaultProps = { onCategoryClick: () => {}, };