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:
@@ -13,7 +13,9 @@ export const LogModal = ({
|
|||||||
onClose,
|
onClose,
|
||||||
status,
|
status,
|
||||||
}: LogModalContent) => {
|
}: LogModalContent) => {
|
||||||
status === "RESET" ? null : (
|
return status === "RESET" ? (
|
||||||
|
<div></div>
|
||||||
|
) : (
|
||||||
<div className="modal modal-open modal-bottom sm:modal-middle bg-base-100/20 backdrop-blur-md z-100">
|
<div className="modal modal-open modal-bottom sm:modal-middle bg-base-100/20 backdrop-blur-md z-100">
|
||||||
<div className="modal-box bg-transparent border-none shadow-none relative">
|
<div className="modal-box bg-transparent border-none shadow-none relative">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ export default function Drawer() {
|
|||||||
className="form-control w-full inline-flex"
|
className="form-control w-full inline-flex"
|
||||||
onSubmit={async (e: React.SubmitEvent<HTMLFormElement>) => {
|
onSubmit={async (e: React.SubmitEvent<HTMLFormElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const password = e.target.password.value;
|
const formData = new FormData(e.currentTarget);
|
||||||
|
const password = formData.get("password") as string;
|
||||||
if (!password) return;
|
if (!password) return;
|
||||||
unlock(password);
|
unlock(password);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user