Adding reducer

This commit is contained in:
okbel
2017-12-18 12:19:46 -03:00
parent 98ef60a48e
commit d7a5e613fa
@@ -0,0 +1,22 @@
import {OPEN_FEATURED_DIALOG, CLOSE_FEATURED_DIALOG} from './constants';
const initialState = {
showFeaturedDialog: false,
};
export default function reducer(state = initialState, action) {
switch (action.type) {
case OPEN_FEATURED_DIALOG:
return {
...state,
showFeaturedDialog: true,
};
case CLOSE_FEATURED_DIALOG:
return {
...state,
showFeaturedDialog: false,
};
default :
return state;
}
}