diff --git a/src/pages/login.js b/src/pages/login.js index a58f397..c575ffd 100644 --- a/src/pages/login.js +++ b/src/pages/login.js @@ -5,7 +5,6 @@ import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import { ToastContainer } from "react-toastify"; -import ReCAPTCHA from "react-google-recaptcha"; const LoginPage = ({ setCurrentUser }) => { const navigate = useNavigate(); @@ -18,7 +17,6 @@ const LoginPage = ({ setCurrentUser }) => { const [loginErr, setLoginErr] = useState(""); const [showPassword, setShowPassword] = useState(false); const [loading, setLoading] = useState(false); - const [captchaToken, setCaptchaToken] = useState(""); const validateForm = () => { const newErrors = {}; @@ -42,10 +40,6 @@ const LoginPage = ({ setCurrentUser }) => { if (!validateForm()) { return; } - if (!captchaToken) { - setLoginErr("Please complete the captcha"); - return; - } setLoading(true); setLoginErr(""); try { @@ -59,8 +53,6 @@ const LoginPage = ({ setCurrentUser }) => { body: JSON.stringify({ username: formData.username, password: formData.password, - captcha: captchaToken, - }), } ); @@ -164,10 +156,6 @@ const LoginPage = ({ setCurrentUser }) => { )} - setCaptchaToken(token)} - />