diff options
Diffstat (limited to 'app/javascript/flavours/glitch/features/explore')
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/components/story.jsx (renamed from app/javascript/flavours/glitch/features/explore/components/story.js) | 0 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/index.jsx (renamed from app/javascript/flavours/glitch/features/explore/index.js) | 12 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/links.jsx (renamed from app/javascript/flavours/glitch/features/explore/links.js) | 3 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/results.jsx (renamed from app/javascript/flavours/glitch/features/explore/results.js) | 4 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/statuses.jsx (renamed from app/javascript/flavours/glitch/features/explore/statuses.js) | 5 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/suggestions.jsx (renamed from app/javascript/flavours/glitch/features/explore/suggestions.js) | 5 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/explore/tags.jsx (renamed from app/javascript/flavours/glitch/features/explore/tags.js) | 3 |
7 files changed, 19 insertions, 13 deletions
diff --git a/app/javascript/flavours/glitch/features/explore/components/story.js b/app/javascript/flavours/glitch/features/explore/components/story.jsx index 8270d3ccb..8270d3ccb 100644 --- a/app/javascript/flavours/glitch/features/explore/components/story.js +++ b/app/javascript/flavours/glitch/features/explore/components/story.jsx diff --git a/app/javascript/flavours/glitch/features/explore/index.js b/app/javascript/flavours/glitch/features/explore/index.jsx index da0dc7f7c..3587de1db 100644 --- a/app/javascript/flavours/glitch/features/explore/index.js +++ b/app/javascript/flavours/glitch/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/flavours/glitch/features/explore/links.js b/app/javascript/flavours/glitch/features/explore/links.jsx index 092f86b29..425934c4a 100644 --- a/app/javascript/flavours/glitch/features/explore/links.js +++ b/app/javascript/flavours/glitch/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/flavours/glitch/features/explore/results.js b/app/javascript/flavours/glitch/features/explore/results.jsx index 892980d95..0d6c0e8f1 100644 --- a/app/javascript/flavours/glitch/features/explore/results.js +++ b/app/javascript/flavours/glitch/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 = { @@ -124,3 +122,5 @@ class Results extends React.PureComponent { } } + +export default connect(mapStateToProps)(injectIntl(Results)); diff --git a/app/javascript/flavours/glitch/features/explore/statuses.js b/app/javascript/flavours/glitch/features/explore/statuses.jsx index 0a5c9de23..381c50c5d 100644 --- a/app/javascript/flavours/glitch/features/explore/statuses.js +++ b/app/javascript/flavours/glitch/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/flavours/glitch/features/explore/suggestions.js b/app/javascript/flavours/glitch/features/explore/suggestions.jsx index 52e5ce62b..e1b84098a 100644 --- a/app/javascript/flavours/glitch/features/explore/suggestions.js +++ b/app/javascript/flavours/glitch/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 = { @@ -29,7 +28,7 @@ class Suggestions extends React.PureComponent { handleDismiss = (accountId) => { const { dispatch } = this.props; dispatch(dismissSuggestion(accountId)); - } + }; render () { const { isLoading, suggestions } = this.props; @@ -54,3 +53,5 @@ class Suggestions extends React.PureComponent { } } + +export default connect(mapStateToProps)(Suggestions); diff --git a/app/javascript/flavours/glitch/features/explore/tags.js b/app/javascript/flavours/glitch/features/explore/tags.jsx index 938036b64..e0fdd1d91 100644 --- a/app/javascript/flavours/glitch/features/explore/tags.js +++ b/app/javascript/flavours/glitch/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); |