Simplify ws updating (#12390)

* Simplify ws updating

* Simplify return values
This commit is contained in:
Nicolas Mowen
2024-07-11 09:25:33 -06:00
committed by GitHub
parent fe4a737421
commit e416e44998
7 changed files with 14 additions and 18 deletions

View File

@@ -31,7 +31,6 @@ 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[];
@@ -64,14 +63,12 @@ export default function LiveDashboardView({
// recent events
const { payload: reviewTopic } = useFrigateReviews();
const eventUpdate = useFrigateReviews();
const { data: allEvents, mutate: updateEvents } = useSWR<ReviewSegment[]>([
"review",
{ limit: 10, severity: "alert" },
]);
const eventUpdate = useDeepMemo(reviewTopic);
useEffect(() => {
if (!eventUpdate) {
return;