filterData.js
346 Bytes
import { SETFILTER, CLEARFILTER } from '../constants/filterData'
const INITIAL_STATE = {
}
export default function filterData (state = INITIAL_STATE, action) {
switch (action.type) {
case SETFILTER:
return {
...state,
...action.obj
}
case CLEARFILTER:
return {}
default:
return state
}
}