17 lines
290 B
JavaScript
17 lines
290 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;
|
|
}
|
|
};
|
|
|