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
399 B
18 lines
399 B
7 years ago
|
import { MODAL_OPEN, MODAL_CLOSE } from 'flavours/glitch/actions/modal';
|
||
8 years ago
|
|
||
8 years ago
|
const initialState = {
|
||
|
modalType: null,
|
||
8 years ago
|
modalProps: {},
|
||
8 years ago
|
};
|
||
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
|
}
|
||
|
};
|