mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
refactor: non dom elements for fetching password
This commit is contained in:
@@ -46,7 +46,8 @@ export default function Drawer() {
|
||||
className="form-control w-full inline-flex"
|
||||
onSubmit={async (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||
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);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user