This commit is contained in:
mgabdev
2020-04-23 02:13:29 -04:00
parent fed036be08
commit e2e7e8c0af
177 changed files with 1231 additions and 1326 deletions

View File

@@ -20,6 +20,8 @@ const mapDispatchToProps = (dispatch, { listId }) => ({
onAdd: () => dispatch(addToListAdder(listId)),
});
// : todo :
export default
@connect(MapStateToProps, mapDispatchToProps)
@injectIntl

View File

@@ -1,21 +1,13 @@
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl } from 'react-intl';
import { createSelector } from 'reselect';
import { getOrderedLists } from '../../selectors'
import { setupListAdder, resetListAdder } from '../../actions/lists';
import List from './components/list';
import Account from '../../components/account';
import Button from '../../components/button';
// import NewListForm from '../lists_directory/components/new_list_form';
const getOrderedLists = createSelector([state => state.get('lists')], lists => {
if (!lists) {
return lists;
}
return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));
});
const mapStateToProps = (state, { accountId }) => ({
listIds: getOrderedLists(state).map(list => list.get('id')),
account: state.getIn(['accounts', accountId]),