From ee6875275677905c18543729ba0bb4f3cf5dff22 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 6 Nov 2025 08:12:12 -0600 Subject: [PATCH] fix setter function --- .../components/overlay/detail/SearchDetailDialog.tsx | 10 ++-------- web/src/context/detail-stream-context.tsx | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index 61c975f6c..bdc5cf9b8 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -235,18 +235,12 @@ function AnnotationSettings({ : "mx-1 max-h-[75dvh] overflow-hidden rounded-t-2xl px-4 pb-4" } {...(isDesktop ? { align: "end" } : {})} + data-annotation-popover > { - if (typeof value === "function") { - const newValue = value(annotationOffset); - setAnnotationOffset(newValue); - } else { - setAnnotationOffset(value); - } - }} + setAnnotationOffset={setAnnotationOffset} /> diff --git a/web/src/context/detail-stream-context.tsx b/web/src/context/detail-stream-context.tsx index ff909a30e..57971f7ac 100644 --- a/web/src/context/detail-stream-context.tsx +++ b/web/src/context/detail-stream-context.tsx @@ -8,7 +8,7 @@ export interface DetailStreamContextType { camera: string; annotationOffset: number; // milliseconds setSelectedObjectIds: React.Dispatch>; - setAnnotationOffset: (ms: number) => void; + setAnnotationOffset: React.Dispatch>; toggleObjectSelection: (id: string | undefined) => void; isDetailMode: boolean; }