diff options
Diffstat (limited to 'app/javascript/mastodon/features/list_editor/components')
-rw-r--r-- | app/javascript/mastodon/features/list_editor/components/account.jsx (renamed from app/javascript/mastodon/features/list_editor/components/account.js) | 4 | ||||
-rw-r--r-- | app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx (renamed from app/javascript/mastodon/features/list_editor/components/edit_list_form.js) | 10 | ||||
-rw-r--r-- | app/javascript/mastodon/features/list_editor/components/search.jsx (renamed from app/javascript/mastodon/features/list_editor/components/search.js) | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/app/javascript/mastodon/features/list_editor/components/account.js b/app/javascript/mastodon/features/list_editor/components/account.jsx index 48085af43..86209bb3c 100644 --- a/app/javascript/mastodon/features/list_editor/components/account.js +++ b/app/javascript/mastodon/features/list_editor/components/account.jsx @@ -31,8 +31,6 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({ onAdd: () => dispatch(addToListEditor(accountId)), }); -export default @connect(makeMapStateToProps, mapDispatchToProps) -@injectIntl class Account extends ImmutablePureComponent { static propTypes = { @@ -75,3 +73,5 @@ class Account extends ImmutablePureComponent { } } + +export default connect(makeMapStateToProps, mapDispatchToProps)(injectIntl(Account)); diff --git a/app/javascript/mastodon/features/list_editor/components/edit_list_form.js b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx index 3ccab12a8..9c1c244cb 100644 --- a/app/javascript/mastodon/features/list_editor/components/edit_list_form.js +++ b/app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx @@ -19,8 +19,6 @@ const mapDispatchToProps = dispatch => ({ onSubmit: () => dispatch(submitListEditor(false)), }); -export default @connect(mapStateToProps, mapDispatchToProps) -@injectIntl class ListForm extends React.PureComponent { static propTypes = { @@ -33,16 +31,16 @@ class ListForm extends React.PureComponent { handleChange = e => { this.props.onChange(e.target.value); - } + }; handleSubmit = e => { e.preventDefault(); this.props.onSubmit(); - } + }; handleClick = () => { this.props.onSubmit(); - } + }; render () { const { value, disabled, intl } = this.props; @@ -68,3 +66,5 @@ class ListForm extends React.PureComponent { } } + +export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(ListForm)); diff --git a/app/javascript/mastodon/features/list_editor/components/search.js b/app/javascript/mastodon/features/list_editor/components/search.jsx index e3f069bb8..f70e272f7 100644 --- a/app/javascript/mastodon/features/list_editor/components/search.js +++ b/app/javascript/mastodon/features/list_editor/components/search.jsx @@ -20,8 +20,6 @@ const mapDispatchToProps = dispatch => ({ onChange: value => dispatch(changeListSuggestions(value)), }); -export default @connect(mapStateToProps, mapDispatchToProps) -@injectIntl class Search extends React.PureComponent { static propTypes = { @@ -34,17 +32,17 @@ class Search extends React.PureComponent { handleChange = e => { this.props.onChange(e.target.value); - } + }; handleKeyUp = e => { if (e.keyCode === 13) { this.props.onSubmit(this.props.value); } - } + }; handleClear = () => { this.props.onClear(); - } + }; render () { const { value, intl } = this.props; @@ -65,7 +63,7 @@ class Search extends React.PureComponent { /> </label> - <div role='button' tabIndex='0' className='search__icon' onClick={this.handleClear}> + <div role='button' tabIndex={0} className='search__icon' onClick={this.handleClear}> <Icon id='search' className={classNames({ active: !hasValue })} /> <Icon id='times-circle' aria-label={intl.formatMessage(messages.search)} className={classNames({ active: hasValue })} /> </div> @@ -74,3 +72,5 @@ class Search extends React.PureComponent { } } + +export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(Search)); |