mirror of https://gitlab.com/ecentrics/breeze
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
856 B
33 lines
856 B
import { STATUS_INITIALIZING, STATUS_INITIALIZED, STATUS_FAILED } from "../constants";
|
|
import { BREEZE_INITIALIZING,BREEZE_INITIALIZED, BREEZE_FAILED } from "./breezeActions";
|
|
|
|
const initialState = {
|
|
status: STATUS_INITIALIZING
|
|
}
|
|
|
|
const breezeStatusReducer = (state = initialState, action) => {
|
|
/*
|
|
* Breeze Status
|
|
*/
|
|
switch (action.type) {
|
|
case BREEZE_INITIALIZING:
|
|
return {
|
|
...state,
|
|
status: STATUS_INITIALIZING
|
|
};
|
|
case BREEZE_INITIALIZED:
|
|
return {
|
|
...state,
|
|
status: STATUS_INITIALIZED
|
|
};
|
|
case BREEZE_FAILED:
|
|
return {
|
|
...state,
|
|
status: STATUS_FAILED
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default breezeStatusReducer
|
|
|