diff options
Diffstat (limited to 'app/javascript/mastodon/features/home_timeline')
-rw-r--r-- | app/javascript/mastodon/features/home_timeline/components/column_settings.jsx (renamed from app/javascript/mastodon/features/home_timeline/components/column_settings.js) | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/features/home_timeline/index.jsx (renamed from app/javascript/mastodon/features/home_timeline/index.js) | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/app/javascript/mastodon/features/home_timeline/components/column_settings.js b/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx index 455e21881..bd15390c0 100644 --- a/app/javascript/mastodon/features/home_timeline/components/column_settings.js +++ b/app/javascript/mastodon/features/home_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 = { @@ -32,3 +31,5 @@ class ColumnSettings extends React.PureComponent { } } + +export default injectIntl(ColumnSettings); diff --git a/app/javascript/mastodon/features/home_timeline/index.js b/app/javascript/mastodon/features/home_timeline/index.jsx index ae11ccbe4..9aa4c6d82 100644 --- a/app/javascript/mastodon/features/home_timeline/index.js +++ b/app/javascript/mastodon/features/home_timeline/index.jsx @@ -30,8 +30,6 @@ const mapStateToProps = state => ({ showAnnouncements: state.getIn(['announcements', 'show']), }); -export default @connect(mapStateToProps) -@injectIntl class HomeTimeline extends React.PureComponent { static contextTypes = { @@ -58,24 +56,24 @@ class HomeTimeline extends React.PureComponent { } else { dispatch(addColumn('HOME', {})); } - } + }; handleMove = (dir) => { const { columnId, dispatch } = this.props; dispatch(moveColumn(columnId, dir)); - } + }; handleHeaderClick = () => { this.column.scrollTop(); - } + }; setRef = c => { this.column = c; - } + }; handleLoadMore = maxId => { this.props.dispatch(expandHomeTimeline({ maxId })); - } + }; componentDidMount () { setTimeout(() => this.props.dispatch(fetchAnnouncements()), 700); @@ -114,7 +112,7 @@ class HomeTimeline extends React.PureComponent { handleToggleAnnouncementsClick = (e) => { e.stopPropagation(); this.props.dispatch(toggleShowAnnouncements()); - } + }; render () { const { intl, hasUnread, columnId, multiColumn, hasAnnouncements, unreadAnnouncements, showAnnouncements } = this.props; @@ -174,3 +172,5 @@ class HomeTimeline extends React.PureComponent { } } + +export default connect(mapStateToProps)(injectIntl(HomeTimeline)); |