fix posting logic

This commit is contained in:
plebbitor
2023-04-22 17:37:53 +02:00
parent b9ee9894df
commit a0d35dfd61
3 changed files with 15 additions and 41 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ import useSuccess from '../../hooks/useSuccess';
const Catalog = () => {
const {
setCaptchaResponse,
captchaResponse, setCaptchaResponse,
setChallengesArray,
defaultSubplebbits,
setIsCaptchaOpen,
@@ -175,7 +175,7 @@ const Catalog = () => {
const handleKeyDown = async (event) => {
if (event.key === 'Enter') {
const currentCaptchaResponse = useGeneralStore.getState().captchaResponse;
const currentCaptchaResponse = captchaResponse;
resolve(currentCaptchaResponse);
setIsCaptchaOpen(false);
document.removeEventListener('keydown', handleKeyDown);