diff --git a/src/components/modals/CaptchaModal.jsx b/src/components/modals/CaptchaModal.jsx index e7f03027..b09bbc1f 100644 --- a/src/components/modals/CaptchaModal.jsx +++ b/src/components/modals/CaptchaModal.jsx @@ -7,7 +7,7 @@ import Draggable from 'react-draggable'; const CaptchaModal = () => { const { - challengesArray, + challengesArray, setChallengesArray, pendingComment, selectedStyle, setCaptchaResponse, @@ -83,6 +83,8 @@ const CaptchaModal = () => { const submitCaptcha = (callback) => { setCaptchaResponse(responseRef.current.value); + setImageSources([]); + setChallengesArray([]); setIsCaptchaOpen(false); if (callback) { @@ -96,6 +98,8 @@ const CaptchaModal = () => { isOpen={isCaptchaOpen} onRequestClose={() => { submitCaptcha(); + setImageSources([]); + setChallengesArray([]); setIsCaptchaOpen(false);}} contentLabel="Captcha Modal" shouldCloseOnEsc={false} @@ -167,7 +171,7 @@ const CaptchaModal = () => { } }} > - {currentChallengeIndex + 1 < totalChallenges ? "Next" : "Post"} + {currentChallengeIndex + 1 < totalChallenges ? "Next" : "Submit"} diff --git a/src/components/styled/modals/CaptchaModal.styled.jsx b/src/components/styled/modals/CaptchaModal.styled.jsx index bb7b886f..6f5e0cc0 100644 --- a/src/components/styled/modals/CaptchaModal.styled.jsx +++ b/src/components/styled/modals/CaptchaModal.styled.jsx @@ -84,7 +84,7 @@ export const StyledModal = styled(Modal)` #nav { float: right; margin: 0; - width: 40px; + width: auto; } ${({ selectedStyle }) => {