You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
420 B

  1. import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
  2. import Immutable from 'immutable';
  3. const initialState = {
  4. modalType: null,
  5. modalProps: {}
  6. };
  7. export default function modal(state = initialState, action) {
  8. switch(action.type) {
  9. case MODAL_OPEN:
  10. return { modalType: action.modalType, modalProps: action.modalProps };
  11. case MODAL_CLOSE:
  12. return initialState;
  13. default:
  14. return state;
  15. }
  16. };