initial docker setup
This commit is contained in:
23
frontend/src/reducers/dialog/dialogReducers.js
Normal file
23
frontend/src/reducers/dialog/dialogReducers.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import {CONTENT_MESSAGE, IS_OPENED} from '../../constants/dialogConstants';
|
||||
|
||||
const moduleReducers = {};
|
||||
|
||||
moduleReducers[CONTENT_MESSAGE] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
dialogContent: action.dialogContent
|
||||
});
|
||||
};
|
||||
|
||||
moduleReducers[IS_OPENED] = (state, action) => {
|
||||
return Object.assign({}, state, {
|
||||
isDialogOpen: action.isDialogOpen
|
||||
});
|
||||
};
|
||||
|
||||
const dialogReducer = (state = {}, action) => {
|
||||
return moduleReducers[action.type]
|
||||
? moduleReducers[action.type](state, action)
|
||||
: state;
|
||||
};
|
||||
|
||||
export default dialogReducer;
|
||||
Reference in New Issue
Block a user