diff options
Diffstat (limited to 'app/javascript/mastodon/features/list_editor')
-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 | ||||
-rw-r--r-- | app/javascript/mastodon/features/list_editor/index.jsx (renamed from app/javascript/mastodon/features/list_editor/index.js) | 6 |
4 files changed, 16 insertions, 16 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)); diff --git a/app/javascript/mastodon/features/list_editor/index.js b/app/javascript/mastodon/features/list_editor/index.jsx index 48466604a..ed9d09132 100644 --- a/app/javascript/mastodon/features/list_editor/index.js +++ b/app/javascript/mastodon/features/list_editor/index.jsx @@ -22,8 +22,6 @@ const mapDispatchToProps = dispatch => ({ onReset: () => dispatch(resetListEditor()), }); -export default @connect(mapStateToProps, mapDispatchToProps) -@injectIntl class ListEditor extends ImmutablePureComponent { static propTypes = { @@ -62,7 +60,7 @@ class ListEditor extends ImmutablePureComponent { {accountIds.map(accountId => <Account key={accountId} accountId={accountId} added />)} </div> - {showSearch && <div role='button' tabIndex='-1' className='drawer__backdrop' onClick={onClear} />} + {showSearch && <div role='button' tabIndex={-1} className='drawer__backdrop' onClick={onClear} />} <Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}> {({ x }) => ( @@ -77,3 +75,5 @@ class ListEditor extends ImmutablePureComponent { } } + +export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(ListEditor)); |