Rev 16750 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
import { actionTypes } from './surveyModal.types'
const initialState = {
isOpen: false,
postUrl: ''
}
const surveyModalReducer = (state = initialState, { type, payload }) => {
switch (type) {
case actionTypes.OPEN_MODAL:
return {
...state,
isOpen: true,
postUrl: payload.postUrl
}
case actionTypes.CLOSE_MODAL:
return { ...state, isOpen: false }
default:
return state
}
}
export default surveyModalReducer