Update the captcha modal to not close on outside clicks

environments/review-captcha-mo-b0pok8/deployments/4883
danidfra 2024-10-10 17:40:54 -03:00
rodzic ea19016ca3
commit bf16faccf0
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -6,7 +6,6 @@ import { useHistory } from 'react-router-dom';
import { cancelReplyCompose } from 'soapbox/actions/compose';
import { cancelEventCompose } from 'soapbox/actions/events';
import { openModal, closeModal } from 'soapbox/actions/modals';
import { startOnboarding } from 'soapbox/actions/onboarding';
import { useAppDispatch, usePrevious } from 'soapbox/hooks';
import type { ModalType } from 'soapbox/features/ui/components/modal-root';
@ -113,8 +112,7 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
} else if ((hasComposeContent || hasEventComposeContent) && type === 'CONFIRM') {
dispatch(closeModal('CONFIRM'));
} else if (type === 'CAPTCHA') {
dispatch(startOnboarding());
onClose();
return;
} else {
onClose();
}