huridocs/uwazi

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

Summary

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

export default combineReducers({
  suggestInfo: createReducer('thesauri.suggestInfo', {}),
  tasksState: createReducer('thesauri.tasksState', {}),
  thesaurus: createReducer('thesauri.thesaurus', {}),
  data: modelReducer('thesauri.data', { name: '', values: [{ label: '', id: ID() }] }),
  formState: formReducer('thesauri.data', { name: '', values: [{ label: '', id: ID() }] }),
});