WIP Loading Header & Remaining changes from Sprint 1
This commit is contained in:
24
client/src/redux/application/application.reducer.js
Normal file
24
client/src/redux/application/application.reducer.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import ApplicationActionTypes from "./application.types";
|
||||
|
||||
const INITIAL_STATE = {
|
||||
loading: false
|
||||
};
|
||||
|
||||
const applicationReducer = (state = INITIAL_STATE, action) => {
|
||||
switch (action.type) {
|
||||
case ApplicationActionTypes.START_LOADING:
|
||||
return {
|
||||
...state,
|
||||
loading: true
|
||||
};
|
||||
case ApplicationActionTypes.END_LOADING:
|
||||
return {
|
||||
...state,
|
||||
loading: false
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default applicationReducer;
|
||||
Reference in New Issue
Block a user