fix findDOMNode captcha modal

This commit is contained in:
plebbitor
2023-03-22 20:55:36 +01:00
parent dea5ba3069
commit 1cb69a75a5
2 changed files with 9 additions and 183 deletions
+4 -2
View File
@@ -257,6 +257,8 @@ const CaptchaModal = ({ isOpen, closeModal, captchaImage }) => {
setCaptchaResponse(event.target.value);
};
const nodeRef = React.useRef(null);
return (
<StyledModal
isOpen={isOpen}
@@ -266,8 +268,8 @@ const CaptchaModal = ({ isOpen, closeModal, captchaImage }) => {
shouldCloseOnOverlayClick={false}
selectedStyle={selectedStyle}
overlayClassName="hide-modal-overlay">
<Draggable handle=".modal-header">
<div className="modal-content">
<Draggable handle=".modal-header" nodeRef={nodeRef}>
<div className="modal-content" ref={nodeRef}>
<div className="modal-header">
Challenges for
<button className="icon" onClick={handleCloseModal} title="close" />