mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
fixed undetected console log
This commit is contained in:
parent
570efa661d
commit
f814fe6c42
3 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { REHYDRATE } from "redux-persist";
|
import { REHYDRATE, RehydrateAction } from "redux-persist";
|
||||||
import { delay, SagaIterator } from "redux-saga";
|
import { delay, SagaIterator } from "redux-saga";
|
||||||
import {
|
import {
|
||||||
takeLatest,
|
takeLatest,
|
||||||
|
@ -253,7 +253,9 @@ function* mapInitSaga() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function* authCheckSaga() {
|
function* authCheckSaga({ key }: RehydrateAction) {
|
||||||
|
if (key !== 'user') return;
|
||||||
|
|
||||||
pushLoaderState(70);
|
pushLoaderState(70);
|
||||||
|
|
||||||
const { id, token } = yield select(getUser);
|
const { id, token } = yield select(getUser);
|
||||||
|
@ -291,6 +293,7 @@ function* authCheckSaga() {
|
||||||
return yield call(mapInitSaga);
|
return yield call(mapInitSaga);
|
||||||
} else if (!ready) {
|
} else if (!ready) {
|
||||||
pushNetworkInitError();
|
pushNetworkInitError();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ export const pushLoaderState = (state: number) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const countDownToRefresh = (left: number = API_RETRY_INTERVAL): void => {
|
export const countDownToRefresh = (left: number = API_RETRY_INTERVAL): void => {
|
||||||
console.log('countdown');
|
|
||||||
if (left <= 0) return document.location.reload();
|
if (left <= 0) return document.location.reload();
|
||||||
|
|
||||||
document.getElementById('loader-bar').style.width = `${(left / API_RETRY_INTERVAL) * 100}%`;
|
document.getElementById('loader-bar').style.width = `${(left / API_RETRY_INTERVAL) * 100}%`;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src/**/*",
|
"./src/index.tsx",
|
||||||
"./backend/**/*",
|
"./backend/**/*",
|
||||||
"./custom.d.ts"
|
"./custom.d.ts"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue