diff --git a/web/src/pages/Events.tsx b/web/src/pages/Events.tsx index f3d185c16..fc821a06f 100644 --- a/web/src/pages/Events.tsx +++ b/web/src/pages/Events.tsx @@ -28,9 +28,10 @@ export default function Events() { // review paging + const [beforeTs, setBeforeTs] = useState(Date.now() / 1000); const last24Hours = useMemo(() => { - return { before: Date.now() / 1000, after: getHoursAgo(24) }; - }, []); + return { before: beforeTs, after: getHoursAgo(24) }; + }, [beforeTs]); const selectedTimeRange = useMemo(() => { if (reviewSearchParams["after"] == undefined) { return last24Hours; @@ -73,7 +74,7 @@ export default function Events() { }; return ["review", params]; }, - [reviewSearchParams] + [reviewSearchParams, last24Hours] ); const { @@ -96,10 +97,7 @@ export default function Events() { setSize(size + 1); }, [size]); - const reloadData = useCallback(() => { - setSize(1); - updateSegments(); - }, []); + const reloadData = useCallback(() => setBeforeTs(Date.now() / 1000), []); // preview videos diff --git a/web/src/pages/Logs.tsx b/web/src/pages/Logs.tsx index f912ed3b5..591fe30f9 100644 --- a/web/src/pages/Logs.tsx +++ b/web/src/pages/Logs.tsx @@ -97,8 +97,9 @@ function Logs() { {!endVisible && ( -
contentRef.current?.scrollTo({ top: contentRef.current?.scrollHeight, @@ -107,7 +108,7 @@ function Logs() { } > Jump to Bottom -
+ )}
- + {isMobile && ( + + )} - + {filter?.before == undefined && ( + + )} - {reachedEnd && currentItems == null && ( + {!isValidating && currentItems == null && (
There are no {severity} items to review @@ -287,9 +291,9 @@ export default function EventView({
); }) - ) : ( + ) : severity != "alert" ? (
- )} + ) : null}