Skip to content

NVR with realtime local object detection for IP cameras

optimistic ui for mobile buttons too (#10827)

Josh Hawkins46e3157c7fe9
diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx
index 9cfe7ed5f0..f5b09836b6 100644
--- a/web/src/components/filter/ReviewFilterGroup.tsx
+++ b/web/src/components/filter/ReviewFilterGroup.tsx
@@ -385,10 +385,10 @@ function ShowReviewFilter({
className="block md:hidden"
size="sm"
variant="secondary"
- onClick={() => setShowReviewed(showReviewed == 0 ? 1 : 0)}
+ onClick={() => setShowReviewedSwitch(showReviewedSwitch == 0 ? 1 : 0)}
>
<FaCheckCircle
- className={`${showReviewed == 1 ? "text-selected" : "text-muted-foreground"}`}
+ className={`${showReviewedSwitch == 1 ? "text-selected" : "text-muted-foreground"}`}
/>
</Button>
</>
@@ -664,10 +664,10 @@ function ShowMotionOnlyButton({
<Button
size="sm"
variant="secondary"
- onClick={() => setMotionOnly(!motionOnly)}
+ onClick={() => setMotionOnlyButton(!motionOnlyButton)}
>
<FaRunning
- className={`${motionOnly ? "text-selected" : "text-muted-foreground"}`}
+ className={`${motionOnlyButton ? "text-selected" : "text-muted-foreground"}`}
/>
</Button>
</div>