Commit 388ba4bc authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '394-bug-login-screen-unresponsive' into 'main'

Bug: Login screen unresponsive

Closes #394

See merge request grin-global/grin-global-ui!387
parents 3fea83d9 520225e2
import { RECEIVE_SSR_ERROR_INFO } from '_core/constants/serverInfo';
import { SystemStatusService } from "@gringlobal-ce/client/service";
import { call, put, takeEvery } from "redux-saga/effects";
import { put, takeEvery } from "redux-saga/effects";
import {
RECEIVE_SERVER_STATUS,
SAGA_GET_SERVER_STATUS,
} from "_core/constants/serverInfo";
import { sagaShowSnackbar } from "@gringlobal-ce/client/action/snackbar";
export const serverInfo = [
takeEvery(SAGA_GET_SERVER_STATUS, getServerStatusSaga),
......@@ -19,16 +18,16 @@ export const receiveSsrError = (status: number, route: string) => ({
});
function* getServerStatusSaga() {
const received = yield SystemStatusService.get();
const received = yield SystemStatusService.get().catch((e) => {
console.log('Error getting server status', e.data?.error || e.toString())
return;
})
if (!received) {
return;
}
yield put({
type: RECEIVE_SERVER_STATUS,
payload: received,
onFail: (e: any) => {
return (function* () {
yield call(sagaShowSnackbar, e.data?.error || e.toString());
return e;
})();
}
payload: received
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment