From a72464bfbb443f5c59262e5c465734d2216d747f Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Wed, 15 Apr 2026 17:26:33 +0530 Subject: [PATCH] refactor: non dom elements for fetching password --- frontend/src/components/ui/LogModal.tsx | 4 +++- frontend/src/pages/Drawer.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ui/LogModal.tsx b/frontend/src/components/ui/LogModal.tsx index 66873ba..691ee92 100644 --- a/frontend/src/components/ui/LogModal.tsx +++ b/frontend/src/components/ui/LogModal.tsx @@ -13,7 +13,9 @@ export const LogModal = ({ onClose, status, }: LogModalContent) => { - status === "RESET" ? null : ( + return status === "RESET" ? ( +
+ ) : (
) => { e.preventDefault(); - const password = e.target.password.value; + const formData = new FormData(e.currentTarget); + const password = formData.get("password") as string; if (!password) return; unlock(password); }}