huridocs/uwazi

View on GitHub
app/react/ConnectionsList/reducers/reducer.js

Summary

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

import prioritySortingCriteria from 'app/utils/prioritySortingCriteria';

export default combineReducers({
  entityId: createReducer('connectionsList/entityId', ''),
  entity: createReducer('connectionsList/entity', {}),
  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'),
  view: createReducer('connectionsList/view', 'graph'),
});