Created
December 5, 2018 15:53
-
-
Save luismec90/fb3090b9f053d957dfb7e432fbf18ae9 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 { SET_YOTPO_REVIEWS } from '../action-constants/yotpo'; | |
export const reducerKey = 'yotpo'; | |
const initialState = { | |
reviews: [], | |
}; | |
export default (state = initialState, action) => { | |
switch (action.type) { | |
case SET_YOTPO_REVIEWS: | |
return Object.assign({}, state, { reviews: action.payload }); | |
default: | |
return state; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment