* Reset snapshot state when event is moved

* Add page listener for review page

* Add same listener for search page

* Use content height
This commit is contained in:
Nicolas Mowen
2024-10-02 08:32:12 -06:00
committed by GitHub
parent 20c3b890ae
commit 0aad7db2d2
3 changed files with 53 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ import {
import { Event } from "@/types/event";
import { FrigateConfig } from "@/types/frigateConfig";
import axios from "axios";
import { useCallback, useMemo, useState } from "react";
import { useCallback, useEffect, useMemo, useState } from "react";
import { isDesktop } from "react-device-detect";
import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch";
import useSWR from "swr";
@@ -62,6 +62,11 @@ export function FrigatePlusDialog({
upload?.plus_id ? "submitted" : "reviewing",
);
useEffect(
() => setState(upload?.plus_id ? "submitted" : "reviewing"),
[upload],
);
const onSubmitToPlus = useCallback(
async (falsePositive: boolean) => {
if (!upload) {