diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-06-24 02:36:54 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-23 19:36:54 +0200 |
commit | c1a8e3d1ebaa6d69e1ae23369a5dedd93ba7226f (patch) | |
tree | e5744319ef50b1ddbb9557d4a2d9fa891ca24385 /app/javascript/mastodon/features/follow_requests | |
parent | 0c44316b22c3711ad5369dae2f66f0fd5c79799e (diff) |
Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
Diffstat (limited to 'app/javascript/mastodon/features/follow_requests')
-rw-r--r-- | app/javascript/mastodon/features/follow_requests/components/account_authorize.js | 5 | ||||
-rw-r--r-- | app/javascript/mastodon/features/follow_requests/index.js | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js index e41597c17..566953ddd 100644 --- a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js +++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js @@ -14,7 +14,8 @@ const messages = defineMessages({ reject: { id: 'follow_request.reject', defaultMessage: 'Reject' }, }); -class AccountAuthorize extends ImmutablePureComponent { +@injectIntl +export default class AccountAuthorize extends ImmutablePureComponent { static propTypes = { account: ImmutablePropTypes.map.isRequired, @@ -47,5 +48,3 @@ class AccountAuthorize extends ImmutablePureComponent { } } - -export default injectIntl(AccountAuthorize); diff --git a/app/javascript/mastodon/features/follow_requests/index.js b/app/javascript/mastodon/features/follow_requests/index.js index 286f128f4..4c9e514cb 100644 --- a/app/javascript/mastodon/features/follow_requests/index.js +++ b/app/javascript/mastodon/features/follow_requests/index.js @@ -19,7 +19,9 @@ const mapStateToProps = state => ({ accountIds: state.getIn(['user_lists', 'follow_requests', 'items']), }); -class FollowRequests extends ImmutablePureComponent { +@connect(mapStateToProps) +@injectIntl +export default class FollowRequests extends ImmutablePureComponent { static propTypes = { params: PropTypes.object.isRequired, @@ -67,5 +69,3 @@ class FollowRequests extends ImmutablePureComponent { } } - -export default connect(mapStateToProps)(injectIntl(FollowRequests)); |