huridocs/uwazi

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

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
import { combineReducers } from 'redux';
import { modelReducer, formReducer } from 'react-redux-form';

import ui from './uiReducer.js';
import templateCommonProperties from '../utils/templateCommonProperties';

export default combineReducers({
  data: modelReducer('template.data', {
    name: '',
    properties: [],
    commonProperties: templateCommonProperties.get(),
  }),
  formState: formReducer('template.data'),
  uiState: ui,
});