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.
19 lines
420 B
19 lines
420 B
8 years ago
|
import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
|
||
8 years ago
|
import Immutable from 'immutable';
|
||
8 years ago
|
|
||
8 years ago
|
const initialState = {
|
||
|
modalType: null,
|
||
|
modalProps: {}
|
||
|
};
|
||
8 years ago
|
|
||
|
export default function modal(state = initialState, action) {
|
||
|
switch(action.type) {
|
||
8 years ago
|
case MODAL_OPEN:
|
||
|
return { modalType: action.modalType, modalProps: action.modalProps };
|
||
8 years ago
|
case MODAL_CLOSE:
|
||
8 years ago
|
return initialState;
|
||
8 years ago
|
default:
|
||
|
return state;
|
||
8 years ago
|
}
|
||
|
};
|