diff options
author | Renaud Chaput <renchap@gmail.com> | 2023-02-20 03:20:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 03:20:59 +0100 |
commit | 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 (patch) | |
tree | 71b60ccd9b23ec8f8d72fa3562f0bc343c6e456e /app/javascript/mastodon/features/ui/components/follow_requests_column_link.js | |
parent | f0e1b12c101e0dd0ddaaef8bdcc166624dba62d5 (diff) |
Rename JSX files with proper `.jsx` extension (#23733)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/follow_requests_column_link.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/follow_requests_column_link.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js b/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js deleted file mode 100644 index 8d4057782..000000000 --- a/app/javascript/mastodon/features/ui/components/follow_requests_column_link.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { fetchFollowRequests } from 'mastodon/actions/accounts'; -import { connect } from 'react-redux'; -import ColumnLink from 'mastodon/features/ui/components/column_link'; -import IconWithBadge from 'mastodon/components/icon_with_badge'; -import { List as ImmutableList } from 'immutable'; -import { injectIntl, defineMessages } from 'react-intl'; - -const messages = defineMessages({ - text: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, -}); - -const mapStateToProps = state => ({ - count: state.getIn(['user_lists', 'follow_requests', 'items'], ImmutableList()).size, -}); - -export default @injectIntl -@connect(mapStateToProps) -class FollowRequestsColumnLink extends React.Component { - - static propTypes = { - dispatch: PropTypes.func.isRequired, - count: PropTypes.number.isRequired, - intl: PropTypes.object.isRequired, - }; - - componentDidMount () { - const { dispatch } = this.props; - - dispatch(fetchFollowRequests()); - } - - render () { - const { count, intl } = this.props; - - if (count === 0) { - return null; - } - - return ( - <ColumnLink - transparent - to='/follow_requests' - icon={<IconWithBadge className='column-link__icon' id='user-plus' count={count} />} - text={intl.formatMessage(messages.text)} - /> - ); - } - -} |