import React from 'react'; import PropTypes from 'prop-types'; import GrowiRenderer from '../../util/GrowiRenderer'; import RevisionLoader from '../Page/RevisionLoader'; export default class SearchResultList extends React.Component { constructor(props) { super(props); this.growiRenderer = new GrowiRenderer(this.props.crowi, this.props.crowiRenderer, { mode: 'searchresult' }); } render() { const resultList = this.props.pages.map((page) => { return (

{page.path}

{ page.tags.length > 0 && ( {page.tags.join(', ')} )}
); }); return (
{resultList}
); } } SearchResultList.propTypes = { crowi: PropTypes.object.isRequired, crowiRenderer: PropTypes.object.isRequired, pages: PropTypes.array.isRequired, searchingKeyword: PropTypes.string.isRequired, }; SearchResultList.defaultProps = { };