2020-03-30 15:26:15 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { ReducerRegistry } from '../redux';
|
|
|
|
|
|
|
|
import { SET_ACTIVE_MODAL_ID } from './actionTypes';
|
|
|
|
|
|
|
|
ReducerRegistry.register('features/base/modal', (state = {}, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case SET_ACTIVE_MODAL_ID:
|
|
|
|
return {
|
|
|
|
...state,
|
2020-04-06 15:14:32 +00:00
|
|
|
activeModalId: action.activeModalId,
|
|
|
|
modalProps: action.modalProps
|
2020-03-30 15:26:15 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|