p5.js-web-editor/client/modules/IDE/reducers/loading.js
siddhant 538a41c617 Added Loader to indicate loading of sketches (#880)
* Added Loader to indicate loading of sketches

* Fixed styles

* Changed styles

* remove prefixes

* Issues Fixed:

* added Loader

* Refactor

* Issues Fixed

* clean up loader functions
2019-05-01 16:32:39 -04:00

14 lines
297 B
JavaScript

import * as ActionTypes from '../../../constants';
const loading = (state = false, action) => {
switch (action.type) {
case ActionTypes.START_LOADING:
return true;
case ActionTypes.STOP_LOADING:
return false;
default:
return state;
}
};
export default loading;