[SHOPTIME-3607] Front 화면의 로딩 노출 개선 필요 (API request 시점부터 화면이 노출될때까지 로딩이 노출되어야함

원인 : 무한 로딩을 위해 Integer 변수의 최대값을 timeout 값으로 사용하여,
timeout 함수의 최대범위를 벗어나 Max time 이 1초로 동작하고 있음.
대책 : 최대 로딩 시간을 setTimeout 함수의 최대 지원값으로 변경(2147483647)
This commit is contained in:
yonghyon
2024-10-07 13:23:46 +09:00
parent dccaa9e2ba
commit d643086ea8

View File

@@ -26,7 +26,7 @@ const loadingImages = [LoadingPreloadImage, LoadingAnimation, LoadingCompleteIma
const MIN_SHOWING_TIME = { launching: 4500, wait: 300, default: 1000 };
const MAX_SHOWING_TIME = 60000;
const MAX_SHOWING_TIME_UNLIMITED = Number.MAX_SAFE_INTEGER;
const MAX_SHOWING_TIME_UNLIMITED = 2147483647; // Number.MAX_SAFE_INTEGER; MAX_SAFE_INTEGER 값 setTimeout 함수에서 미지원.
const DUMMY_DELAY = 1000;
const HIDING_TIME = 300;
@@ -110,6 +110,7 @@ export default function LoadingPanel({ showLoadingPanel, ...rest }) {
minShowingTimeJob && minShowingTimeJob.stop();
hidingJob && hidingJob.stop();
maxShowingTimeJob && maxShowingTimeJob.stop();
maxShowingTimeJob = null;
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
}
}