diff options
Diffstat (limited to 'app/javascript/mastodon/features/picture_in_picture')
-rw-r--r-- | app/javascript/mastodon/features/picture_in_picture/components/footer.jsx (renamed from app/javascript/mastodon/features/picture_in_picture/components/footer.js) | 10 | ||||
-rw-r--r-- | app/javascript/mastodon/features/picture_in_picture/components/header.jsx (renamed from app/javascript/mastodon/features/picture_in_picture/components/header.js) | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/features/picture_in_picture/index.jsx (renamed from app/javascript/mastodon/features/picture_in_picture/index.js) | 5 |
3 files changed, 10 insertions, 9 deletions
diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.js b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx index 0dff834c3..66124f331 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.js +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.jsx @@ -37,8 +37,6 @@ const makeMapStateToProps = () => { return mapStateToProps; }; -export default @connect(makeMapStateToProps) -@injectIntl class Footer extends ImmutablePureComponent { static contextTypes = { @@ -112,7 +110,7 @@ class Footer extends ImmutablePureComponent { _performReblog = (status, privacy) => { const { dispatch } = this.props; dispatch(reblog(status, privacy)); - } + }; handleReblogClick = e => { const { dispatch, status } = this.props; @@ -149,7 +147,7 @@ class Footer extends ImmutablePureComponent { } router.history.push(`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`); - } + }; render () { const { status, intl, withOpenButton } = this.props; @@ -184,9 +182,11 @@ class Footer extends ImmutablePureComponent { <IconButton className='status__action-bar-button' title={replyTitle} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} counter={status.get('replies_count')} obfuscateCount /> <IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' onClick={this.handleReblogClick} counter={status.get('reblogs_count')} /> <IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} counter={status.get('favourites_count')} /> - {withOpenButton && <IconButton className='status__action-bar-button' title={intl.formatMessage(messages.open)} icon='external-link' onClick={this.handleOpenClick} href={`/@${status.getIn(['account', 'acct'])}\/${status.get('id')}`} />} + {withOpenButton && <IconButton className='status__action-bar-button' title={intl.formatMessage(messages.open)} icon='external-link' onClick={this.handleOpenClick} href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} />} </div> ); } } + +export default connect(makeMapStateToProps)(injectIntl(Footer)); diff --git a/app/javascript/mastodon/features/picture_in_picture/components/header.js b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx index e05d8c62e..100f9db7a 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/header.js +++ b/app/javascript/mastodon/features/picture_in_picture/components/header.jsx @@ -17,8 +17,6 @@ const mapStateToProps = (state, { accountId }) => ({ account: state.getIn(['accounts', accountId]), }); -export default @connect(mapStateToProps) -@injectIntl class Header extends ImmutablePureComponent { static propTypes = { @@ -45,3 +43,5 @@ class Header extends ImmutablePureComponent { } } + +export default connect(mapStateToProps)(injectIntl(Header)); diff --git a/app/javascript/mastodon/features/picture_in_picture/index.js b/app/javascript/mastodon/features/picture_in_picture/index.jsx index 1e59fbcd3..ae48a1b4e 100644 --- a/app/javascript/mastodon/features/picture_in_picture/index.js +++ b/app/javascript/mastodon/features/picture_in_picture/index.jsx @@ -11,7 +11,6 @@ const mapStateToProps = state => ({ ...state.get('picture_in_picture'), }); -export default @connect(mapStateToProps) class PictureInPicture extends React.Component { static propTypes = { @@ -32,7 +31,7 @@ class PictureInPicture extends React.Component { handleClose = () => { const { dispatch } = this.props; dispatch(removePictureInPicture()); - } + }; render () { const { type, src, currentTime, accountId, statusId } = this.props; @@ -83,3 +82,5 @@ class PictureInPicture extends React.Component { } } + +export default connect(mapStateToProps)(PictureInPicture); |