Rev 1608 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import { shareModalActionTypes } from './shareModal.types'const InitialState = {isOpen: false,postUrl: '',modalType: '',feedType: '',feedSharedId: ''}const { OPEN_MODAL, CLOSE_MODAL } = shareModalActionTypesconst shareModalReducer = (state = InitialState, { type, payload }) => {switch (type) {case OPEN_MODAL: {return {...state,isOpen: true,feedSharedId: payload.feed_unique,...payload}}case CLOSE_MODAL: {return { ...state, isOpen: false }}default: {return state}}}export default shareModalReducer