Progress
This commit is contained in:
@@ -6,19 +6,19 @@ import {
|
||||
|
||||
const initialState = Immutable.Map({
|
||||
popoverType: null,
|
||||
placement: null,
|
||||
popoverProps: null,
|
||||
})
|
||||
|
||||
export default function popoverMenu(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case POPOVER_OPEN:
|
||||
return {
|
||||
popoverType: action.popoverType,
|
||||
popoverProps: action.popoverProps,
|
||||
}
|
||||
case POPOVER_CLOSE:
|
||||
return initialState
|
||||
default:
|
||||
return state
|
||||
case POPOVER_OPEN:
|
||||
return state.withMutations(map => {
|
||||
map.set('popoverType', action.popoverType)
|
||||
map.set('popoverProps', action.popoverProps)
|
||||
})
|
||||
case POPOVER_CLOSE:
|
||||
return initialState
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user