import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import AccountContainer from '../../../containers/account_container'; import StatusContainer from '../../../containers/status_container'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Hashtag from '../../../components/hashtag'; import LoadingIndicator from 'soapbox/components/loading_indicator'; import FilterBar from '../../search/components/filter_bar'; import LoadMore from '../../../components/load_more'; import classNames from 'classnames'; export default class SearchResults extends ImmutablePureComponent { static propTypes = { results: ImmutablePropTypes.map.isRequired, submitted: PropTypes.bool, expandSearch: PropTypes.func.isRequired, }; state = { selectedFilter: 'accounts', }; handleLoadMore = () => this.props.expandSearch(this.state.selectedFilter); handleSelectFilter = newActiveFilter => { this.setState({ selectedFilter: newActiveFilter }); }; render() { const { results, submitted } = this.props; const { selectedFilter } = this.state; if (submitted && results.isEmpty()) { return (