Remove trending hashtags (#7711)
* Delete trends_controller.rb * Update routes.rb * Update trending_tags.rb * Update index.js * Update index.js * Update search_results.js * Update async-components.js * Update index.js * Delete trends.js * Delete trends.js * Delete trends_container.js * Delete trends.js * Update search_results.js * Update search_results_container.js
This commit is contained in:
parent
00512ecf87
commit
0deb9fa6b9
13 changed files with 2 additions and 226 deletions
|
@ -1,5 +1,4 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import AccountContainer from '../../../containers/account_container';
|
||||
|
@ -11,36 +10,14 @@ export default class SearchResults extends ImmutablePureComponent {
|
|||
|
||||
static propTypes = {
|
||||
results: ImmutablePropTypes.map.isRequired,
|
||||
trends: ImmutablePropTypes.list,
|
||||
fetchTrends: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
componentDidMount () {
|
||||
const { fetchTrends } = this.props;
|
||||
fetchTrends();
|
||||
}
|
||||
|
||||
render () {
|
||||
const { results, trends } = this.props;
|
||||
const { results } = this.props;
|
||||
|
||||
let accounts, statuses, hashtags;
|
||||
let count = 0;
|
||||
|
||||
if (results.isEmpty()) {
|
||||
return (
|
||||
<div className='search-results'>
|
||||
<div className='trends'>
|
||||
<div className='trends__header'>
|
||||
<i className='fa fa-fire fa-fw' />
|
||||
<FormattedMessage id='trends.header' defaultMessage='Trending now' />
|
||||
</div>
|
||||
|
||||
{trends && trends.map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (results.get('accounts') && results.get('accounts').size > 0) {
|
||||
count += results.get('accounts').size;
|
||||
accounts = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue