mon-entreprise/reducers.js

19 lines
303 B
JavaScript
Raw Normal View History

2016-06-29 10:27:04 +00:00
import { combineReducers } from 'redux'
import { SELECT_TAG } from './actions'
function selectedTags(state = [], {type, tagName, tagValue}) {
switch (type) {
2016-06-29 10:27:04 +00:00
case SELECT_TAG:
return [...state, [tagName, tagValue]]
2016-06-29 10:27:04 +00:00
default:
return state
}
}
2016-06-29 10:27:04 +00:00
export default combineReducers({
selectedTags
2016-06-29 10:27:04 +00:00
})