diff options
Diffstat (limited to 'app/javascript/flavours/glitch/features/list_adder/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/list_adder/components/account.jsx (renamed from app/javascript/flavours/glitch/features/list_adder/components/account.js) | 4 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/list_adder/components/list.jsx (renamed from app/javascript/flavours/glitch/features/list_adder/components/list.js) | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/list_adder/components/account.js b/app/javascript/flavours/glitch/features/list_adder/components/account.jsx index 1369aac07..034ed0edc 100644 --- a/app/javascript/flavours/glitch/features/list_adder/components/account.js +++ b/app/javascript/flavours/glitch/features/list_adder/components/account.jsx @@ -18,8 +18,6 @@ const makeMapStateToProps = () => { }; -export default @connect(makeMapStateToProps) -@injectIntl class Account extends ImmutablePureComponent { static propTypes = { @@ -41,3 +39,5 @@ class Account extends ImmutablePureComponent { } } + +export default connect(makeMapStateToProps)(injectIntl(Account)); diff --git a/app/javascript/flavours/glitch/features/list_adder/components/list.js b/app/javascript/flavours/glitch/features/list_adder/components/list.jsx index 4666ca47b..1957bbe42 100644 --- a/app/javascript/flavours/glitch/features/list_adder/components/list.js +++ b/app/javascript/flavours/glitch/features/list_adder/components/list.jsx @@ -13,7 +13,7 @@ const messages = defineMessages({ add: { id: 'lists.account.add', defaultMessage: 'Add to list' }, }); -const MapStateToProps = (state, { listId, added }) => ({ +const mapStateToProps = (state, { listId, added }) => ({ list: state.get('lists').get(listId), added: typeof added === 'undefined' ? state.getIn(['listAdder', 'lists', 'items']).includes(listId) : added, }); @@ -23,8 +23,6 @@ const mapDispatchToProps = (dispatch, { listId }) => ({ onAdd: () => dispatch(addToListAdder(listId)), }); -export default @connect(MapStateToProps, mapDispatchToProps) -@injectIntl class List extends ImmutablePureComponent { static propTypes = { @@ -67,3 +65,5 @@ class List extends ImmutablePureComponent { } } + +export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(List)); |