diff options
| author | Larvan2 <[email protected]> | 2026-04-18 14:18:28 +0800 |
|---|---|---|
| committer | Larvan2 <[email protected]> | 2026-04-18 14:18:28 +0800 |
| commit | 2cf83223f6d4b551998e8cd8f74fcec5e7ffd8ae (patch) | |
| tree | 9d9acd7e88ca8af2d34c9ef34b853b8d90f3c2ea /src/modules/logs | |
| parent | fd39af8af5e2e6ba88f8ba2ac3e6101aeda2b6c1 (diff) | |
fix(logs): improve log fetching and add log level selection
Diffstat (limited to 'src/modules/logs')
| -rw-r--r-- | src/modules/logs/hooks.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/logs/hooks.ts b/src/modules/logs/hooks.ts index 45e09e4..abab77f 100644 --- a/src/modules/logs/hooks.ts +++ b/src/modules/logs/hooks.ts @@ -35,6 +35,9 @@ export function useLogsPage({ useEffect(() => { fetchLogs({ ...apiConfig, logLevel }, appendLogInternal); + return () => { + stopLogs(); + }; }, [apiConfig, logLevel, appendLogInternal]); const scrollRef = useRef<HTMLDivElement>(null); @@ -65,4 +68,4 @@ export function useLogsPage({ scrollToBottom, onScroll, }; -}
\ No newline at end of file +} |
