huridocs/uwazi

View on GitHub
app/react/Connections/reducers/connectionsListReducer.js

Summary

Maintainability
A
0 mins
Test Coverage
import { combineReducers } from 'redux';
import createReducer from 'app/BasicReducer';
import { modelReducer, formReducer } from 'react-redux-form';

import prioritySortingCriteria from 'app/utils/prioritySortingCriteria';

export default combineReducers({
  entityId: createReducer('connectionsList/entityId', ''),
  connectionsGroups: createReducer('connectionsList/connectionsGroups', []),
  searchResults: createReducer('connectionsList/searchResults', { totalRows: 0, rows: [] }),
  sort: modelReducer('connectionsList.sort', prioritySortingCriteria.get()),
  filters: createReducer('connectionsList/filters', {}),
  search: formReducer('connectionsList/search'),
});