fix captchaResponse

This commit is contained in:
plebbitor
2023-04-15 16:40:37 +02:00
parent 5c5b9287ee
commit 71fd9adf7c
+3 -2
View File
@@ -188,9 +188,10 @@ const Board = () => {
challengeImg.onload = () => {
setIsCaptchaOpen(true);
const handleKeyDown = (event) => {
const handleKeyDown = async (event) => {
if (event.key === 'Enter') {
resolve(captchaResponse);
const currentCaptchaResponse = useGeneralStore.getState().captchaResponse;
resolve(currentCaptchaResponse);
setIsCaptchaOpen(false);
document.removeEventListener('keydown', handleKeyDown);
event.preventDefault();