diff --git a/app/(pages)/admin/components/LoginForm/index.tsx b/app/(pages)/admin/components/LoginForm/index.tsx index dbc047cf..e52bdca6 100644 --- a/app/(pages)/admin/components/LoginForm/index.tsx +++ b/app/(pages)/admin/components/LoginForm/index.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useState, useEffect } from "react"; import { Input, Button, Link, Card, Image } from "@nextui-org/react"; import { AiOutlineEyeInvisible, AiTwotoneEye } from "react-icons/ai"; @@ -16,13 +18,13 @@ export default function LoginForm() { const [userData, setUserData] = useState({ email: "", role: "", action: "" }); const [loginDisabled, setLoginDisabled] = useState(true); - function handleEmailChange(e) { + function handleEmailChange(e: any) { const error = FormValidator.validateEmail(e.target.value); formValidator.setError("email", error); setEmail(e.target.value); } - function handlePasswordChange(e) { + function handlePasswordChange(e: any) { const error = FormValidator.validatePassword(e.target.value); formValidator.setError("password", error); setPassword(e.target.value); @@ -34,7 +36,7 @@ export default function LoginForm() { setLoginDisabled(formValidator.hasErrors() || !email || !password); }, [email, password]); - async function handleFormSubmit(e) { + async function handleFormSubmit(e: any) { e.preventDefault(); const formData = new FormData(e.currentTarget); diff --git a/app/(pages)/admin/components/PinVerification/index.tsx b/app/(pages)/admin/components/PinVerification/index.tsx index 3badb8ed..e22d1c4d 100644 --- a/app/(pages)/admin/components/PinVerification/index.tsx +++ b/app/(pages)/admin/components/PinVerification/index.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useState, useEffect } from "react"; import { Card, Input, Button } from "@nextui-org/react";