From 4454d2886cdb7480eebaac09d56c007e7f65367c Mon Sep 17 00:00:00 2001 From: Elhamne Date: Wed, 8 Feb 2023 21:04:43 +0330 Subject: [PATCH] Changed handleclose on leave & grow modal, #13 --- src/components/modals/GrowFamilyModal.jsx | 2 +- src/components/modals/LeaveFamilyModal.jsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/modals/GrowFamilyModal.jsx b/src/components/modals/GrowFamilyModal.jsx index 64e3b18f..1ea8fb58 100644 --- a/src/components/modals/GrowFamilyModal.jsx +++ b/src/components/modals/GrowFamilyModal.jsx @@ -71,8 +71,8 @@ export default function GrowFamilyModal({ menuOpen, setMenuOpen, theChild }) { setSubmitDisabled(true); }; const handleClose = () => { - setOpen(false); setMenuOpen(false); + setOpen(false); setInviteRole(''); setShareText(''); }; diff --git a/src/components/modals/LeaveFamilyModal.jsx b/src/components/modals/LeaveFamilyModal.jsx index bece4c68..8b4108be 100644 --- a/src/components/modals/LeaveFamilyModal.jsx +++ b/src/components/modals/LeaveFamilyModal.jsx @@ -44,7 +44,10 @@ export default function LeaveFamilyModal({ menuOpen, setMenuOpen, theChild }) { const [open, setOpen] = useState(false); const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); + const handleClose = () => { + setMenuOpen(false); + setOpen(false); + }; const handleLeave = () => { dispatch(leaveFamily(theChild.familyId)); handleClose();