Created
August 29, 2018 15:45
-
-
Save roniewill/0a931dfc8c808d94c3f3ad684843cf3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as types from '../actions/types'; | |
const INITIAL_STATE = { | |
modalOpen: false, | |
}; | |
export default (state = INITIAL_STATE, { type }) => { | |
switch (type) { | |
case types.MODAL_OPEN: | |
return { modalOpen: true }; | |
case types.MODAL_CLOSE: | |
return INITIAL_STATE; | |
default: return state; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment