diff --git a/src/components/modals/CaptchaModal.jsx b/src/components/modals/CaptchaModal.jsx index b5aa4438..7ac7cb79 100644 --- a/src/components/modals/CaptchaModal.jsx +++ b/src/components/modals/CaptchaModal.jsx @@ -37,7 +37,6 @@ const CaptchaModal = () => { }, [isCaptchaOpen, setIsAuthorDelete, setIsAuthorEdit, setIsModEdit]); - useEffect(() => { const handleResize = () => setIsMobile(window.innerWidth <= 480); window.addEventListener('resize', handleResize); @@ -71,7 +70,10 @@ const CaptchaModal = () => { const handleKeyDown = (event) => { if (event.key === "Enter") { event.preventDefault(); - submitCaptcha(); + submitCaptcha((response) => { + setCaptchaResponse(response); + resolveCaptchaPromise(response); + }); } };