13 lines
279 B
JavaScript
13 lines
279 B
JavaScript
import { RECEIVE_RESULTS, REMOVE_RESULTS } from '../actions/results'
|
|
|
|
export default (state = null, action) => {
|
|
switch (action.type) {
|
|
case RECEIVE_RESULTS:
|
|
return action.payload || []
|
|
case REMOVE_RESULTS:
|
|
return null
|
|
default:
|
|
return state
|
|
}
|
|
}
|