All files / src/reducers filter.js

100% Statements 4/4
100% Branches 4/4
100% Functions 1/1
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16      6x   2x     1x     3x        
import { SET_FILTER, CLEAR_FILTER } from '../actionTypes'
 
export default function filterReducer (state = false, action) {
  switch (action.type) {
    case SET_FILTER:
      return action.filter
    
    case CLEAR_FILTER:
      return false
    
    default:
      return state
  }
}