diff options
Diffstat (limited to 'app/javascript/mastodon/features/community_timeline')
-rw-r--r-- | app/javascript/mastodon/features/community_timeline/components/column_settings.jsx (renamed from app/javascript/mastodon/features/community_timeline/components/column_settings.js) | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/features/community_timeline/index.jsx (renamed from app/javascript/mastodon/features/community_timeline/index.js) | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/app/javascript/mastodon/features/community_timeline/components/column_settings.js b/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx index 0cb6db883..d6181919a 100644 --- a/app/javascript/mastodon/features/community_timeline/components/column_settings.js +++ b/app/javascript/mastodon/features/community_timeline/components/column_settings.jsx @@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, FormattedMessage } from 'react-intl'; import SettingToggle from '../../notifications/components/setting_toggle'; -export default @injectIntl class ColumnSettings extends React.PureComponent { static propTypes = { @@ -27,3 +26,5 @@ class ColumnSettings extends React.PureComponent { } } + +export default injectIntl(ColumnSettings); diff --git a/app/javascript/mastodon/features/community_timeline/index.js b/app/javascript/mastodon/features/community_timeline/index.jsx index 7b3f8845f..e41d11bb5 100644 --- a/app/javascript/mastodon/features/community_timeline/index.js +++ b/app/javascript/mastodon/features/community_timeline/index.jsx @@ -30,8 +30,6 @@ const mapStateToProps = (state, { columnId }) => { }; }; -export default @connect(mapStateToProps) -@injectIntl class CommunityTimeline extends React.PureComponent { static contextTypes = { @@ -60,16 +58,16 @@ class CommunityTimeline extends React.PureComponent { } else { dispatch(addColumn('COMMUNITY', { other: { onlyMedia } })); } - } + }; handleMove = (dir) => { const { columnId, dispatch } = this.props; dispatch(moveColumn(columnId, dir)); - } + }; handleHeaderClick = () => { this.column.scrollTop(); - } + }; componentDidMount () { const { dispatch, onlyMedia } = this.props; @@ -109,13 +107,13 @@ class CommunityTimeline extends React.PureComponent { setRef = c => { this.column = c; - } + }; handleLoadMore = maxId => { const { dispatch, onlyMedia } = this.props; dispatch(expandCommunityTimeline({ maxId, onlyMedia })); - } + }; render () { const { intl, hasUnread, columnId, multiColumn, onlyMedia } = this.props; @@ -158,3 +156,5 @@ class CommunityTimeline extends React.PureComponent { } } + +export default connect(mapStateToProps)(injectIntl(CommunityTimeline)); |