알림목록 지표없음 문제 수정
This commit is contained in:
@@ -40,7 +40,14 @@ export function useTradeNotificationSignalSnapshot(
|
||||
}
|
||||
|
||||
setSnapshot(snap ?? undefined);
|
||||
setLoading(false);
|
||||
|
||||
// strategy 가 아직 로드되지 않았고 데이터도 없으면 loading 유지:
|
||||
// strategy 가 로드되면 refresh 가 갱신되어 재시도하며, 그때 조건이 표시된다.
|
||||
if (!snap && strategy === undefined) {
|
||||
setLoading(true);
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
}, [market, strategyId, strategy, enabled]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -51,6 +58,7 @@ export function useTradeNotificationSignalSnapshot(
|
||||
return;
|
||||
}
|
||||
emptyRetryRef.current = 0;
|
||||
setLoading(true); // 활성화 즉시 로딩 표시
|
||||
void refresh();
|
||||
const id = window.setInterval(() => void refresh(), pollMs);
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user