p5.js-web-editor/client/modules/IDE/reducers/search.js
raclim 3d779734c3 Searchbar (#1132)
* search bar function

* Fixes #231, adds searchbar to sketchlist

* Fixes #231, update requested changes to searchbar

* Fixes #231, reset search term after modal closed
2019-08-21 14:08:08 -04:00

14 lines
303 B
JavaScript

import * as ActionTypes from '../../../constants';
const initialState = {
searchTerm: ''
};
export default (state = initialState, action) => {
switch (action.type) {
case ActionTypes.SET_SEARCH_TERM:
return { ...state, searchTerm: action.query };
default:
return state;
}
};