diff options
Diffstat (limited to 'app/javascript/mastodon/features/explore')
-rw-r--r-- | app/javascript/mastodon/features/explore/components/story.jsx (renamed from app/javascript/mastodon/features/explore/components/story.js) | 0 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/index.jsx (renamed from app/javascript/mastodon/features/explore/index.js) | 12 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/links.jsx (renamed from app/javascript/mastodon/features/explore/links.js) | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/results.jsx (renamed from app/javascript/mastodon/features/explore/results.js) | 6 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/statuses.jsx (renamed from app/javascript/mastodon/features/explore/statuses.js) | 5 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/suggestions.jsx (renamed from app/javascript/mastodon/features/explore/suggestions.js) | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/features/explore/tags.jsx (renamed from app/javascript/mastodon/features/explore/tags.js) | 3 |
7 files changed, 19 insertions, 13 deletions
diff --git a/app/javascript/mastodon/features/explore/components/story.js b/app/javascript/mastodon/features/explore/components/story.jsx index 563128029..563128029 100644 --- a/app/javascript/mastodon/features/explore/components/story.js +++ b/app/javascript/mastodon/features/explore/components/story.jsx diff --git a/app/javascript/mastodon/features/explore/index.js b/app/javascript/mastodon/features/explore/index.jsx index 1ae249f45..939550d83 100644 --- a/app/javascript/mastodon/features/explore/index.js +++ b/app/javascript/mastodon/features/explore/index.jsx @@ -24,8 +24,6 @@ const mapStateToProps = state => ({ isSearching: state.getIn(['search', 'submitted']) || !showTrends, }); -export default @connect(mapStateToProps) -@injectIntl class Explore extends React.PureComponent { static contextTypes = { @@ -41,11 +39,11 @@ class Explore extends React.PureComponent { handleHeaderClick = () => { this.column.scrollTop(); - } + }; setRef = c => { this.column = c; - } + }; render() { const { intl, multiColumn, isSearching } = this.props; @@ -90,7 +88,9 @@ class Explore extends React.PureComponent { <Route path='/explore/tags' component={Tags} /> <Route path='/explore/links' component={Links} /> <Route path='/explore/suggestions' component={Suggestions} /> - <Route exact path={['/explore', '/explore/posts', '/search']} component={Statuses} componentParams={{ multiColumn }} /> + <Route exact path={['/explore', '/explore/posts', '/search']}> + <Statuses multiColumn={multiColumn} /> + </Route> </Switch> <Helmet> @@ -105,3 +105,5 @@ class Explore extends React.PureComponent { } } + +export default connect(mapStateToProps)(injectIntl(Explore)); diff --git a/app/javascript/mastodon/features/explore/links.js b/app/javascript/mastodon/features/explore/links.jsx index b47fc8fcf..193739916 100644 --- a/app/javascript/mastodon/features/explore/links.js +++ b/app/javascript/mastodon/features/explore/links.jsx @@ -13,7 +13,6 @@ const mapStateToProps = state => ({ isLoading: state.getIn(['trends', 'links', 'isLoading']), }); -export default @connect(mapStateToProps) class Links extends React.PureComponent { static propTypes = { @@ -68,3 +67,5 @@ class Links extends React.PureComponent { } } + +export default connect(mapStateToProps)(Links); diff --git a/app/javascript/mastodon/features/explore/results.js b/app/javascript/mastodon/features/explore/results.jsx index b2f6c72b7..9725cf35c 100644 --- a/app/javascript/mastodon/features/explore/results.js +++ b/app/javascript/mastodon/features/explore/results.jsx @@ -42,8 +42,6 @@ const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', resul <Status key={`status-${item}`} id={item} /> )), onLoadMore); -export default @connect(mapStateToProps) -@injectIntl class Results extends React.PureComponent { static propTypes = { @@ -107,7 +105,7 @@ class Results extends React.PureComponent { <React.Fragment> <div className='account__section-headline'> <button onClick={this.handleSelectAll} className={type === 'all' && 'active'}><FormattedMessage id='search_results.all' defaultMessage='All' /></button> - <button onClick={this.handleSelectAccounts} className={type === 'accounts' && 'active'}><FormattedMessage id='search_results.accounts' defaultMessage='People' /></button> + <button onClick={this.handleSelectAccounts} className={type === 'accounts' && 'active'}><FormattedMessage id='search_results.accounts' defaultMessage='Profiles' /></button> <button onClick={this.handleSelectHashtags} className={type === 'hashtags' && 'active'}><FormattedMessage id='search_results.hashtags' defaultMessage='Hashtags' /></button> <button onClick={this.handleSelectStatuses} className={type === 'statuses' && 'active'}><FormattedMessage id='search_results.statuses' defaultMessage='Posts' /></button> </div> @@ -124,3 +122,5 @@ class Results extends React.PureComponent { } } + +export default connect(mapStateToProps)(injectIntl(Results)); diff --git a/app/javascript/mastodon/features/explore/statuses.js b/app/javascript/mastodon/features/explore/statuses.jsx index 791f11b9f..a98a6d046 100644 --- a/app/javascript/mastodon/features/explore/statuses.js +++ b/app/javascript/mastodon/features/explore/statuses.jsx @@ -14,7 +14,6 @@ const mapStateToProps = state => ({ hasMore: !!state.getIn(['status_lists', 'trending', 'next']), }); -export default @connect(mapStateToProps) class Statuses extends React.PureComponent { static propTypes = { @@ -33,7 +32,7 @@ class Statuses extends React.PureComponent { handleLoadMore = debounce(() => { const { dispatch } = this.props; dispatch(expandTrendingStatuses()); - }, 300, { leading: true }) + }, 300, { leading: true }); render () { const { isLoading, hasMore, statusIds, multiColumn } = this.props; @@ -62,3 +61,5 @@ class Statuses extends React.PureComponent { } } + +export default connect(mapStateToProps)(Statuses); diff --git a/app/javascript/mastodon/features/explore/suggestions.js b/app/javascript/mastodon/features/explore/suggestions.jsx index e6ad09974..53eb7ba4b 100644 --- a/app/javascript/mastodon/features/explore/suggestions.js +++ b/app/javascript/mastodon/features/explore/suggestions.jsx @@ -12,7 +12,6 @@ const mapStateToProps = state => ({ isLoading: state.getIn(['suggestions', 'isLoading']), }); -export default @connect(mapStateToProps) class Suggestions extends React.PureComponent { static propTypes = { @@ -49,3 +48,5 @@ class Suggestions extends React.PureComponent { } } + +export default connect(mapStateToProps)(Suggestions); diff --git a/app/javascript/mastodon/features/explore/tags.js b/app/javascript/mastodon/features/explore/tags.jsx index 258dc392f..3ba813c3f 100644 --- a/app/javascript/mastodon/features/explore/tags.js +++ b/app/javascript/mastodon/features/explore/tags.jsx @@ -13,7 +13,6 @@ const mapStateToProps = state => ({ isLoadingHashtags: state.getIn(['trends', 'tags', 'isLoading']), }); -export default @connect(mapStateToProps) class Tags extends React.PureComponent { static propTypes = { @@ -60,3 +59,5 @@ class Tags extends React.PureComponent { } } + +export default connect(mapStateToProps)(Tags); |