prevent user setup modal from closing when dismissing a notification

This commit is contained in:
saml33 2023-01-05 22:21:30 +11:00
parent 29d9083701
commit 2e736ebaf2
2 changed files with 8 additions and 3 deletions

View File

@ -228,7 +228,7 @@ const UserSetupModal = ({
}
return (
<Modal isOpen={isOpen} onClose={onClose} fullScreen>
<Modal isOpen={isOpen} onClose={onClose} fullScreen disableOutsideClose>
<div className="radial-gradient-bg grid h-screen overflow-auto text-left lg:grid-cols-2">
<img
className="absolute -bottom-6 right-0 hidden h-auto w-[53%] lg:block xl:w-[57%]"

View File

@ -18,14 +18,19 @@ function Modal({
onClose,
hideClose,
}: ModalProps) {
const handleClose = () => {
if (disableOutsideClose) return
onClose()
}
return (
<Dialog
open={isOpen}
onClose={onClose}
onClose={handleClose}
className="relative z-40 overflow-y-auto"
>
<div
className={`fixed inset-0 backdrop-brightness-50 ${
className={`fixed inset-0 backdrop-brightness-[0.3] ${
disableOutsideClose ? 'pointer-events-none' : ''
}`}
aria-hidden="true"