gitlab-org--gitlab-foss/app/assets/javascripts/reports/store/getters.js
Filipa Lacerda 15511ed14f Changes after review:
- Cleans up CSS to use common classes
- Removes getters to use mapState instead
- Makes the first request even when tab is not visible
- Show loading state in 204
2018-08-02 17:59:25 +01:00

16 lines
375 B
JavaScript

import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../constants';
export const summaryStatus = state => {
if (state.isLoading) {
return LOADING;
}
if (state.hasError || state.status === STATUS_FAILED) {
return ERROR;
}
return SUCCESS;
};
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};