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