2019-08-21 18:08:08 +00:00
|
|
|
import * as ActionTypes from '../../../constants';
|
|
|
|
|
|
|
|
const initialState = {
|
2019-11-10 20:39:22 +00:00
|
|
|
collectionSearchTerm: '',
|
|
|
|
sketchSearchTerm: ''
|
2019-08-21 18:08:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default (state = initialState, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case ActionTypes.SET_SEARCH_TERM:
|
2019-11-10 20:39:22 +00:00
|
|
|
return { ...state, [`${action.scope}SearchTerm`]: action.query };
|
2019-08-21 18:08:08 +00:00
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|