refactor: update ApprovalCard to use state for wasAlreadyDecided across all HITL tools

- Changed the wasAlreadyDecided variable to use useState for better state management in ApprovalCard.
- Updated multiple components including Gmail, Google Calendar, and Notion to reflect this change, ensuring consistency across the application.
This commit is contained in:
Anish Sarkar 2026-03-20 23:06:58 +05:30
parent b4309f13be
commit 4b54826d78
14 changed files with 14 additions and 14 deletions

View file

@ -129,7 +129,7 @@ function ApprovalCard({
const [decided, setDecided] = useState<"approve" | "reject" | "edit" | null>(
interruptData.__decided__ ?? null
);
const wasAlreadyDecided = interruptData.__decided__ != null;
const [wasAlreadyDecided] = useState(() => interruptData.__decided__ != null);
const [isPanelOpen, setIsPanelOpen] = useState(false);
const openHitlEditPanel = useSetAtom(openHitlEditPanelAtom);
const [pendingEdits, setPendingEdits] = useState<{