Quick UI fixes (#10695)

* Quick fixes

* remove log
This commit is contained in:
Nicolas Mowen
2024-03-26 18:54:00 -06:00
committed by GitHub
parent 8f69edeb33
commit d945e77443
3 changed files with 16 additions and 3 deletions

View File

@@ -69,7 +69,20 @@ export default function Events() {
}, [last24Hours, reviewSearchParams]);
// we want to update the items whenever the severity changes
useEffect(() => setBeforeTs(Date.now() / 1000), [severity]);
useEffect(() => {
if (recording) {
return;
}
const now = Date.now() / 1000;
if (now - beforeTs > 60) {
setBeforeTs(now);
}
// only refresh when severity changes
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [severity]);
const reviewSegmentFetcher = useCallback((key: Array<string> | string) => {
const [path, params] = Array.isArray(key) ? key : [key, undefined];