kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Update the captcha modal to not close on outside clicks
rodzic
ea19016ca3
commit
bf16faccf0
|
@ -6,7 +6,6 @@ import { useHistory } from 'react-router-dom';
|
||||||
import { cancelReplyCompose } from 'soapbox/actions/compose';
|
import { cancelReplyCompose } from 'soapbox/actions/compose';
|
||||||
import { cancelEventCompose } from 'soapbox/actions/events';
|
import { cancelEventCompose } from 'soapbox/actions/events';
|
||||||
import { openModal, closeModal } from 'soapbox/actions/modals';
|
import { openModal, closeModal } from 'soapbox/actions/modals';
|
||||||
import { startOnboarding } from 'soapbox/actions/onboarding';
|
|
||||||
import { useAppDispatch, usePrevious } from 'soapbox/hooks';
|
import { useAppDispatch, usePrevious } from 'soapbox/hooks';
|
||||||
|
|
||||||
import type { ModalType } from 'soapbox/features/ui/components/modal-root';
|
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') {
|
} else if ((hasComposeContent || hasEventComposeContent) && type === 'CONFIRM') {
|
||||||
dispatch(closeModal('CONFIRM'));
|
dispatch(closeModal('CONFIRM'));
|
||||||
} else if (type === 'CAPTCHA') {
|
} else if (type === 'CAPTCHA') {
|
||||||
dispatch(startOnboarding());
|
return;
|
||||||
onClose();
|
|
||||||
} else {
|
} else {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue