1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-03-13 21:25:04 +00:00
mon-entreprise/reducers.js

19 lines
303 B
JavaScript
Raw Normal View History

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