fix: remove unused captchaToken state
Some checks failed
Deploy Next.js application / deploy (push) Failing after 24m31s

This commit is contained in:
Dorian Niemiec 2024-09-09 15:57:23 +02:00
parent bdc679376d
commit b8e2d341f1

View file

@ -19,14 +19,12 @@ const Newsletter = () => {
"idle" | "loading" | "success" | "already" | "error"
>("idle");
const [input, setInput] = useState<string>("");
const [captchaToken, setCaptchaToken] = useState<string | null>(null);
const [showCaptcha, setShowCaptcha] = useState<boolean>(false);
const [isSubmitting, setIsSubmitting] = useState<boolean>(false); // Added this line
const buttonRef = useRef<HTMLButtonElement>(null);
const hcaptchaRef = useRef<HCaptcha>(null);
const handleCaptcha = async (token: string) => {
setCaptchaToken(token);
setShowCaptcha(false);
await handleSubmit(token);
};