mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 09:16:22 +02:00
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:
parent
b4309f13be
commit
4b54826d78
14 changed files with 14 additions and 14 deletions
|
|
@ -135,7 +135,7 @@ function ApprovalCard({
|
|||
const [decided, setDecided] = useState<"approve" | "reject" | null>(
|
||||
interruptData.__decided__ ?? null
|
||||
);
|
||||
const wasAlreadyDecided = interruptData.__decided__ != null;
|
||||
const [wasAlreadyDecided] = useState(() => interruptData.__decided__ != null);
|
||||
const [deleteFromKb, setDeleteFromKb] = useState(
|
||||
typeof actionArgs.delete_from_kb === "boolean" ? actionArgs.delete_from_kb : false
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue