알림목록 지표없음 문제 수정

This commit is contained in:
Macbook
2026-06-07 02:39:02 +09:00
parent 63c56a11b2
commit b6b056c3b5
2 changed files with 12 additions and 4 deletions
@@ -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 () => {