mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix review update causing api spam (#12387)
This commit is contained in:
parent
0d7ee7a87a
commit
40be915061
@ -31,6 +31,7 @@ import { cn } from "@/lib/utils";
|
||||
import { LivePlayerError, LivePlayerMode } from "@/types/live";
|
||||
import { FaCompress, FaExpand } from "react-icons/fa";
|
||||
import { useResizeObserver } from "@/hooks/resize-observer";
|
||||
import useDeepMemo from "@/hooks/use-deep-memo";
|
||||
|
||||
type LiveDashboardViewProps = {
|
||||
cameras: CameraConfig[];
|
||||
@ -63,12 +64,14 @@ export default function LiveDashboardView({
|
||||
|
||||
// recent events
|
||||
|
||||
const { payload: eventUpdate } = useFrigateReviews();
|
||||
const { payload: reviewTopic } = useFrigateReviews();
|
||||
const { data: allEvents, mutate: updateEvents } = useSWR<ReviewSegment[]>([
|
||||
"review",
|
||||
{ limit: 10, severity: "alert" },
|
||||
]);
|
||||
|
||||
const eventUpdate = useDeepMemo(reviewTopic);
|
||||
|
||||
useEffect(() => {
|
||||
if (!eventUpdate) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user