Update recordings view (#10585)

* Update recordings view

* Fix opening recordings view from gif
This commit is contained in:
Nicolas Mowen
2024-03-21 08:43:37 -05:00
committed by GitHub
parent f113acee33
commit 865c26ff18
5 changed files with 124 additions and 102 deletions
@@ -7,6 +7,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
import { ReviewSegment } from "@/types/review";
import { useNavigate } from "react-router-dom";
import { Skeleton } from "../ui/skeleton";
import { RecordingStartingPoint } from "@/types/record";
type AnimatedEventThumbnailProps = {
event: ReviewSegment;
@@ -18,7 +19,13 @@ export function AnimatedEventThumbnail({ event }: AnimatedEventThumbnailProps) {
const navigate = useNavigate();
const onOpenReview = useCallback(() => {
navigate("events", { state: { review: event.id } });
navigate("events", {
state: {
camera: event.camera,
startTime: event.start_time,
severity: event.severity,
} as RecordingStartingPoint,
});
}, [navigate, event]);
// image behavior