import PropTypes from 'prop-types'; import React from 'react'; import AuthorPoster from 'Author/AuthorPoster'; import Label from 'Components/Label'; import { kinds } from 'Helpers/Props'; import styles from './AuthorSearchResult.css'; function AuthorSearchResult(props) { const { match, name, images, tags } = props; let tag = null; if (match.key === 'tags.label') { tag = tags[match.arrayIndex]; } return (
{name}
{ tag ?
: null }
); } AuthorSearchResult.propTypes = { name: PropTypes.string.isRequired, images: PropTypes.arrayOf(PropTypes.object).isRequired, tags: PropTypes.arrayOf(PropTypes.object).isRequired, match: PropTypes.object.isRequired }; export default AuthorSearchResult;